From fc6adc6771681f59ae365f00f1fe66f544beabea Mon Sep 17 00:00:00 2001 From: Carlo Costino Date: Wed, 16 Oct 2024 12:44:55 -0400 Subject: [PATCH 1/2] Fix the prod and demo deployment actions This changeset fixes the prod and deployment actions so they have the correct environment variables. It also fixes the egress proxy deploy config for each. Signed-off-by: Carlo Costino --- .github/workflows/deploy-demo.yml | 8 ++++++-- .github/workflows/deploy-prod.yml | 12 ++++++++---- .github/workflows/deploy.yml | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 31b9cec6bb..fd51e3cb2e 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -74,12 +74,11 @@ jobs: --vars-file deploy-config/demo.yml --var DANGEROUS_SALT="$DANGEROUS_SALT" --var SECRET_KEY="$SECRET_KEY" - --var ADMIN_CLIENT_USERNAME="notify-admin" --var ADMIN_CLIENT_SECRET="$ADMIN_CLIENT_SECRET" + --var ADMIN_CLIENT_USERNAME="$ADMIN_CLIENT_USERNAME" --var NEW_RELIC_LICENSE_KEY="$NEW_RELIC_LICENSE_KEY" --var NR_BROWSER_KEY="$NR_BROWSER_KEY" --var COMMIT_HASH="$COMMIT_HASH" - --var LOGIN_PEM="$LOGIN_PEM" --var LOGIN_DOT_GOV_CLIENT_ID="$LOGIN_DOT_GOV_CLIENT_ID" --var LOGIN_DOT_GOV_USER_INFO_URL="$LOGIN_DOT_GOV_USER_INFO_URL" --var LOGIN_DOT_GOV_ACCESS_TOKEN_URL="$LOGIN_DOT_GOV_ACCESS_TOKEN_URL" @@ -88,6 +87,7 @@ jobs: --var LOGIN_DOT_GOV_SIGNOUT_REDIRECT="$LOGIN_DOT_GOV_SIGNOUT_REDIRECT" --var LOGIN_DOT_GOV_INITIAL_SIGNIN_URL="$LOGIN_DOT_GOV_INITIAL_SIGNIN_URL" --var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL" + --var LOGIN_PEM="$LOGIN_PEM" --strategy rolling - name: Check for changes to egress config @@ -101,6 +101,10 @@ jobs: - name: Deploy egress proxy if: steps.changed-egress-config.outputs.any_changed == 'true' uses: ./.github/actions/deploy-proxy + env: + CF_USERNAME: ${{ secrets.CLOUDGOV_USERNAME }} + CF_PASSWORD: ${{ secrets.CLOUDGOV_PASSWORD }} with: + cf_org: gsa-tts-benefits-studio cf_space: notify-demo app: notify-admin-demo diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index dd71b1e112..6e9482a97e 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -74,12 +74,11 @@ jobs: --vars-file deploy-config/production.yml --var DANGEROUS_SALT="$DANGEROUS_SALT" --var SECRET_KEY="$SECRET_KEY" - --var ADMIN_CLIENT_USERNAME="notify-admin" --var ADMIN_CLIENT_SECRET="$ADMIN_CLIENT_SECRET" + --var ADMIN_CLIENT_USERNAME="$ADMIN_CLIENT_USERNAME" --var NEW_RELIC_LICENSE_KEY="$NEW_RELIC_LICENSE_KEY" --var NR_BROWSER_KEY="$NR_BROWSER_KEY" --var COMMIT_HASH="$COMMIT_HASH" - --var LOGIN_PEM="$LOGIN_PEM" --var LOGIN_DOT_GOV_CLIENT_ID="$LOGIN_DOT_GOV_CLIENT_ID" --var LOGIN_DOT_GOV_USER_INFO_URL="$LOGIN_DOT_GOV_USER_INFO_URL" --var LOGIN_DOT_GOV_ACCESS_TOKEN_URL="$LOGIN_DOT_GOV_ACCESS_TOKEN_URL" @@ -88,6 +87,7 @@ jobs: --var LOGIN_DOT_GOV_SIGNOUT_REDIRECT="$LOGIN_DOT_GOV_SIGNOUT_REDIRECT" --var LOGIN_DOT_GOV_INITIAL_SIGNIN_URL="$LOGIN_DOT_GOV_INITIAL_SIGNIN_URL" --var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL" + --var LOGIN_PEM="$LOGIN_PEM" --strategy rolling - name: Check for changes to egress config @@ -101,6 +101,10 @@ jobs: - name: Deploy egress proxy if: steps.changed-egress-config.outputs.any_changed == 'true' uses: ./.github/actions/deploy-proxy + env: + CF_USERNAME: ${{ secrets.CLOUDGOV_USERNAME }} + CF_PASSWORD: ${{ secrets.CLOUDGOV_PASSWORD }} with: - cf_space: notify-production - app: notify-admin-production + cf_org: gsa-tts-benefits-studio + cf_space: notify-prod + app: notify-admin-prod diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 09f69c73d6..815dc11293 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -107,7 +107,7 @@ jobs: .github/actions/deploy-proxy/action.yml .github/workflows/deploy.yml - name: Deploy egress proxy - #if: steps.changed-egress-config.outputs.any_changed == 'true' + if: steps.changed-egress-config.outputs.any_changed == 'true' uses: ./.github/actions/deploy-proxy env: CF_USERNAME: ${{ secrets.CLOUDGOV_USERNAME }} From e54d18170e1141bda97ff68c7478977e11351b85 Mon Sep 17 00:00:00 2001 From: Carlo Costino Date: Wed, 16 Oct 2024 13:03:35 -0400 Subject: [PATCH 2/2] Add missing env var Signed-off-by: Carlo Costino --- .github/workflows/deploy-demo.yml | 1 + .github/workflows/deploy-prod.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index fd51e3cb2e..532f6aad62 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -52,6 +52,7 @@ jobs: DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }} SECRET_KEY: ${{ secrets.SECRET_KEY }} ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }} + ADMIN_CLIENT_USERNAME: "notify-admin" NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} NR_BROWSER_KEY: ${{ secrets.NR_BROWSER_KEY }} COMMIT_HASH: ${{ github.sha }} diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 6e9482a97e..13a295943c 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -52,6 +52,7 @@ jobs: DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }} SECRET_KEY: ${{ secrets.SECRET_KEY }} ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }} + ADMIN_CLIENT_USERNAME: "notify-admin" NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} NR_BROWSER_KEY: ${{ secrets.NR_BROWSER_KEY }} COMMIT_HASH: ${{ github.sha }}