From 3f932462908266bd4773cde222d0d29b1faa4551 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Boll Date: Fri, 20 Dec 2024 13:01:52 +0100 Subject: [PATCH] test --- .github/workflows/services-pr-check.yml | 4 ++++ frontend/Makefile | 3 ++- frontend/pipeline.yaml | 4 ++-- helm-cmd.mk | 5 +++++ run_pipeline.sh | 1 - 5 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 helm-cmd.mk diff --git a/.github/workflows/services-pr-check.yml b/.github/workflows/services-pr-check.yml index 8fffaa41a6..2f540a9761 100644 --- a/.github/workflows/services-pr-check.yml +++ b/.github/workflows/services-pr-check.yml @@ -70,6 +70,10 @@ with: kubelogin-version: 'v0.1.3' + - name: 'Install helm diff' + run: | + helm plugin install https://github.com/databus23/helm-diff + - name: 'Deploy Frontend' env: PRINCIPAL_ID: ${{ secrets.GHA_PRINCIPAL_ID }} diff --git a/frontend/Makefile b/frontend/Makefile index a2dd7bef36..d24fa2a90f 100644 --- a/frontend/Makefile +++ b/frontend/Makefile @@ -1,4 +1,5 @@ -include ../setup-env.mk +-include ../helm-cmd.mk ifndef COMMIT COMMIT := $(shell git rev-parse --short=7 HEAD) @@ -52,7 +53,7 @@ deploy: TENANT_ID=$(shell az account show --query tenantId --output tsv) && \ kubectl create namespace aro-hcp --dry-run=client -o json | kubectl apply -f - && \ kubectl label namespace aro-hcp "istio.io/rev=$${ISTO_VERSION}" --overwrite=true && \ - helm diff --install ${HELM_DRY_RUN} aro-hcp-frontend-dev \ + ${HELM_CMD} aro-hcp-frontend-dev \ deploy/helm/frontend/ \ --set azure.clientId=$${SECRET_STORE_MI_CLIENT_ID} \ --set azure.tenantId=$${TENANT_ID} \ diff --git a/frontend/pipeline.yaml b/frontend/pipeline.yaml index ab4d1dc8b5..a8ecd902e7 100644 --- a/frontend/pipeline.yaml +++ b/frontend/pipeline.yaml @@ -11,8 +11,8 @@ resourceGroups: command: make deploy dryRun: variables: - - name: HELM_DRY_RUN - value: "--suppress-secrets" + - name: DRY_RUN + value: "true" variables: - name: ARO_HCP_IMAGE_ACR configRef: svcAcrName diff --git a/helm-cmd.mk b/helm-cmd.mk new file mode 100644 index 0000000000..1183f23a37 --- /dev/null +++ b/helm-cmd.mk @@ -0,0 +1,5 @@ +ifdef DRY_RUN +HELM_CMD ?= helm diff --install --suppress-secrets +else +HELM_CMD ?= helm upgrade --install +endif diff --git a/run_pipeline.sh b/run_pipeline.sh index 718052fb38..b0354dd48a 100755 --- a/run_pipeline.sh +++ b/run_pipeline.sh @@ -111,7 +111,6 @@ fi make -s -C ${PROJECT_ROOT_DIR}/tooling/templatize templatize TEMPLATIZE="${PROJECT_ROOT_DIR}/tooling/templatize/templatize" -helm plugin install https://github.com/databus23/helm-diff CONFIG_FILE=${CONFIG_FILE:-${PROJECT_ROOT_DIR}/config/config.yaml} $TEMPLATIZE pipeline run \