From e4cafa459e95a4838145c246a918f50859990e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emiliano=20Sun=CC=83e=CC=81?= Date: Fri, 15 Nov 2024 13:19:43 -0800 Subject: [PATCH] Declare env for secrets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emiliano Suñé --- .github/workflows/uninstall_install_sandbox.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/uninstall_install_sandbox.yaml b/.github/workflows/uninstall_install_sandbox.yaml index fc7ddee..d4dcc60 100644 --- a/.github/workflows/uninstall_install_sandbox.yaml +++ b/.github/workflows/uninstall_install_sandbox.yaml @@ -31,12 +31,16 @@ jobs: namespace: ${{ secrets.OPENSHIFT_NAMESPACE_SANDBOX }} - name: Uninstall Traction via Helm + env: + namespace: ${{ secrets.OPENSHIFT_NAMESPACE_SANDBOX }} run: | - helm uninstall traction-sandbox -n ${{ secrets.OPENSHIFT_NAMESPACE_SANDBOX }} --wait --timeout=20m || true + helm uninstall traction-sandbox -n "$namespace" --wait --timeout=20m || true - name: Remove Traction Openshift Objects + env: + namespace: ${{ secrets.OPENSHIFT_NAMESPACE_SANDBOX }} run: | - oc delete -n ${{ secrets.OPENSHIFT_NAMESPACE_SANDBOX }} all,secret,pod,networkpolicy,configmap,pvc --selector "app.kubernetes.io/instance"=traction-sandbox + oc delete -n "$namespace" all,secret,pod,networkpolicy,configmap,pvc --selector "app.kubernetes.io/instance"=traction-sandbox - name: Rocket.Chat Notification uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@1.1.1 @@ -75,10 +79,12 @@ jobs: run: echo "BANNER_MESSAGE=$($GITHUB_WORKSPACE/src/bash/reset-sandbox-date.sh)" >> $GITHUB_ENV - name: Install Traction via Helm + env: + namespace: ${{ secrets.OPENSHIFT_NAMESPACE_SANDBOX }} run: | helm repo add traction https://bcgov.github.io/traction helm upgrade --install \ - -n ${{ secrets.OPENSHIFT_NAMESPACE_SANDBOX }} --wait --timeout=7m \ + -n "$namespace" --wait --timeout=7m \ -f ./services/traction/sandbox/values.yaml \ --set ui.ux.infoBanner.message="${BANNER_MESSAGE}" \ traction-sandbox traction/traction