From 2d97918bd60256318db75444566a45c92df447bd Mon Sep 17 00:00:00 2001 From: maxmwang Date: Sat, 28 Sep 2024 18:21:24 -0700 Subject: [PATCH] use --set-string for tag --- .github/workflows/cd-dev.yaml | 6 +++--- infra/app/templates/cleanup.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd-dev.yaml b/.github/workflows/cd-dev.yaml index fd840b7e3..b68d421b3 100644 --- a/.github/workflows/cd-dev.yaml +++ b/.github/workflows/cd-dev.yaml @@ -27,7 +27,7 @@ jobs: - name: Set vars id: vars run: | - echo "sha_short=\"$(git rev-parse --short ${{ github.sha }})\"" >> $GITHUB_OUTPUT + echo "sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT build-push: name: Build and Push Images @@ -56,8 +56,8 @@ jobs: helm install bt-dev-app-${{ needs.compute-sha.outputs.sha_short }} ./app --namespace=bt \ --set env=dev \ --set ttl=${{ inputs.ttl }} \ - --set frontend.image.tag=${{ needs.compute-sha.outputs.sha_short }} \ - --set backend.image.tag=${{ needs.compute-sha.outputs.sha_short }} \ + --set-string frontend.image.tag=${{ needs.compute-sha.outputs.sha_short }} \ + --set-string backend.image.tag=${{ needs.compute-sha.outputs.sha_short }} \ --set host=${{ needs.compute-sha.outputs.sha_short }}.stanfurdtime.com \ --set mongoUri=mongodb://bt-dev-mongo-mongodb.bt.svc.cluster.local:27017/bt \ --set redisUri=redis://bt-dev-redis-master.bt.svc.cluster.local:6379 \ diff --git a/infra/app/templates/cleanup.yaml b/infra/app/templates/cleanup.yaml index b2e0f408c..c5f85eba3 100644 --- a/infra/app/templates/cleanup.yaml +++ b/infra/app/templates/cleanup.yaml @@ -11,6 +11,6 @@ spec: containers: - name: cleanup image: alpine/helm - command: ['sh', '-c', 'sleep ${{ `{{` }} {{ .Values.ttl }} * 60 * 60 {{ `}}` }}; helm uninstall {{ .Release.Name }}'] + command: ['sh', '-c', 'sleep $(( {{ .Values.ttl }} * 60 * 60 )); helm uninstall {{ .Release.Name }}'] restartPolicy: Never {{ end }}