From 99ff9ae29ee940b36da0f365e462db9528536be4 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Wed, 10 Feb 2021 11:02:37 -0600 Subject: [PATCH] chore(aio): cleans up start up script This removes the script's redundant project creation curl calls as this is created by the project code here [0]. This also moved the wedged temporary script last to allow projects creation to occur prior to the dev pipeline run. [0] https://opendev.org/airship/charts/src/commit/1169477e6585449357f937bfda31a52b402185ca/charts/jarvis-project/templates/Job-project.yaml#L53-L72 Signed-off-by: Tin Lam Change-Id: Ie6ca362cf7d05dd07881e8540c556f7a3ad534e7 --- tools/deployment/vagrant/Vagrantfile | 1 + tools/gate/jarvis/650-temporary-setup.sh | 17 ----------------- tools/gate/jarvis/900-development-pipeline.sh | 11 +++++++++++ zuul.d/jobs.yaml | 1 + 4 files changed, 13 insertions(+), 17 deletions(-) create mode 100755 tools/gate/jarvis/900-development-pipeline.sh diff --git a/tools/deployment/vagrant/Vagrantfile b/tools/deployment/vagrant/Vagrantfile index 8666149c..254565b6 100644 --- a/tools/deployment/vagrant/Vagrantfile +++ b/tools/deployment/vagrant/Vagrantfile @@ -43,5 +43,6 @@ Vagrant.configure("2") do |config| ./tools/gate/jarvis/650-temporary-setup.sh ./tools/gate/jarvis/700-deploy-jarvis-system.sh ./tools/gate/jarvis/800-deploy-jarvis-projects.sh + ./tools/gate/jarvis/900-development-pipeline.sh SHELL end diff --git a/tools/gate/jarvis/650-temporary-setup.sh b/tools/gate/jarvis/650-temporary-setup.sh index c6cbbfbf..339d3434 100755 --- a/tools/gate/jarvis/650-temporary-setup.sh +++ b/tools/gate/jarvis/650-temporary-setup.sh @@ -8,20 +8,3 @@ kubectl create secret generic kubeconfig-secret --from-file=kubeconfig=$HOME/.ku #NOTE Will not be required once Harbor is backed by LDAP kubectl create secret generic harbor-basic-auth --from-literal=username='admin' --from-literal=password='Harbor12345' -n development-pipeline || true kubectl create secret docker-registry harbor-docker-auth --docker-username=admin --docker-password=Harbor12345 --docker-email=example@gmail.com --docker-server=harbor-core.jarvis.local -n development-pipeline || true -#TODO(staceyF) Put this into appropriate jarvis-project tasks -curl -X POST "https://harbor-core.jarvis.local/api/v2.0/projects" -H "accept: application/json" -H "X-Request-Id: 12345" -H "authorization: Basic YWRtaW46SGFyYm9yMTIzNDU=" -H "Content-Type: application/json" -d "{ \"project_name\": \"mongodb-staging\", \"public\": true, \"metadata\": { \"auto_scan\": \"true\" }}" || true -curl -X POST "https://harbor-core.jarvis.local/api/v2.0/projects" -H "accept: application/json" -H "X-Request-Id: 12345" -H "authorization: Basic YWRtaW46SGFyYm9yMTIzNDU=" -H "Content-Type: application/json" -d "{ \"project_name\": \"mongodb\", \"public\": true, \"metadata\": { \"auto_scan\": \"true\" }}" || true - -#NOTE This is temporary to trigger and validate that the development-pipeline is working prior to being refactored. - -cd ./tools/images -sudo make build IMAGE_FULLNAME=standard-container:1.0 - -cd ../../charts -helm upgrade --install development-pipeline -n development-pipeline ./development-pipeline - -kubectl apply -n development-pipeline -f ./development-pipeline/config_map.yaml.example - -kubectl create -n development-pipeline -f ./development-pipeline/pipelinerun-validation.yaml - -../tools/deployment/common/wait-for-pipelinerun.sh development-pipeline development-pipeline diff --git a/tools/gate/jarvis/900-development-pipeline.sh b/tools/gate/jarvis/900-development-pipeline.sh new file mode 100755 index 00000000..b2cbb033 --- /dev/null +++ b/tools/gate/jarvis/900-development-pipeline.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -ex + +cd ./tools/images +sudo make build IMAGE_FULLNAME=standard-container:1.0 + +cd ../../charts +helm upgrade --install development-pipeline -n development-pipeline ./development-pipeline +kubectl apply -n development-pipeline -f ./development-pipeline/config_map.yaml.example +kubectl create -n development-pipeline -f ./development-pipeline/pipelinerun-validation.yaml +../tools/deployment/common/wait-for-pipelinerun.sh development-pipeline development-pipeline diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 7567bd05..3ae74b81 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -41,6 +41,7 @@ - ./tools/gate/jarvis/650-temporary-setup.sh - ./tools/gate/jarvis/700-deploy-jarvis-system.sh - ./tools/gate/jarvis/800-deploy-jarvis-projects.sh + - ./tools/gate/jarvis/900-development-pipeline.sh - job: name: airship-jarvis-sample-workload-validation