From f1691274c865e3c07b55f7d7b48d0d78a85f3061 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 18 Mar 2025 11:19:08 -0700 Subject: [PATCH 1/2] fix update-templates --- .github/workflows/checks.yml | 2 ++ .github/workflows/deploy-demo.yml | 6 +++--- .github/workflows/deploy-prod.yml | 6 +++--- .github/workflows/deploy.yml | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2d7311e1d..a66de657c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -65,6 +65,8 @@ jobs: - name: Check coverage threshold # TODO get this back up to 95 run: poetry run coverage report -m --fail-under=94 + - name: Update templates + run: cf run-task notify-api-staging --command "flask command update-templates" validate-new-relic-config: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 6d71a473d..4dc7104fe 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -74,9 +74,9 @@ jobs: --var LOGIN_DOT_GOV_REGISTRATION_URL="$LOGIN_DOT_GOV_REGISTRATION_URL" --strategy rolling - # TODO FIX - # - name: Update templates - # run: cf run-task notify-api-demo --command "flask command update-templates" + + - name: Update templates + run: cf run-task notify-api-demo --command "flask command update-templates" - name: Deploy egress proxy uses: ./.github/actions/deploy-proxy diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index bd9be3a7d..337b0533e 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -78,9 +78,9 @@ jobs: --var LOGIN_DOT_GOV_REGISTRATION_URL="$LOGIN_DOT_GOV_REGISTRATION_URL" --strategy rolling - # TODO FIX - # - name: Update templates - # run: cf run-task notify-api-production --command "flask command update-templates" + + - name: Update templates + run: cf run-task notify-api-production --command "flask command update-templates" - name: Deploy egress proxy uses: ./.github/actions/deploy-proxy diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 546a02e82..3ceee8908 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -80,9 +80,9 @@ jobs: --var LOGIN_DOT_GOV_REGISTRATION_URL="$LOGIN_DOT_GOV_REGISTRATION_URL" --strategy rolling - # TODO FIX - # - name: Update templates - # run: cf run-task notify-api-staging --command "flask command update-templates" + + - name: Update templates + run: cf run-task notify-api-staging --command "flask command update-templates" - name: Deploy egress proxy uses: ./.github/actions/deploy-proxy From 3711851b7ffa28bbb293cb4b5d4da8854c759f10 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 18 Mar 2025 12:00:13 -0700 Subject: [PATCH 2/2] fix update-templates --- .github/workflows/checks.yml | 2 -- .github/workflows/deploy-demo.yml | 20 ++++++++++++++++++-- .github/workflows/deploy-prod.yml | 19 +++++++++++++++++-- .github/workflows/deploy.yml | 18 ++++++++++++++++-- 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a66de657c..2d7311e1d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -65,8 +65,6 @@ jobs: - name: Check coverage threshold # TODO get this back up to 95 run: poetry run coverage report -m --fail-under=94 - - name: Update templates - run: cf run-task notify-api-staging --command "flask command update-templates" validate-new-relic-config: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 4dc7104fe..c74b8d934 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -74,9 +74,25 @@ jobs: --var LOGIN_DOT_GOV_REGISTRATION_URL="$LOGIN_DOT_GOV_REGISTRATION_URL" --strategy rolling - - name: Update templates - run: cf run-task notify-api-demo --command "flask command update-templates" + uses: cloud-gov/cg-cli-tools@main + env: + DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }} + NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} + NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} + NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} + LOGIN_DOT_GOV_REGISTRATION_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-demo.app.cloud.gov/set-up-your-profile&response_type=code&scope=openid+email&state=STATE" + + with: + cf_username: ${{ secrets.CLOUDGOV_USERNAME }} + cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} + cf_org: gsa-tts-benefits-studio + cf_space: notify-demo + cf_command: >- + run-task notify-api-demo --command "flask command update-templates" + - name: Deploy egress proxy uses: ./.github/actions/deploy-proxy diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 337b0533e..df9663430 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -78,9 +78,24 @@ jobs: --var LOGIN_DOT_GOV_REGISTRATION_URL="$LOGIN_DOT_GOV_REGISTRATION_URL" --strategy rolling - - name: Update templates - run: cf run-task notify-api-production --command "flask command update-templates" + uses: cloud-gov/cg-cli-tools@main + env: + DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }} + NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} + NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} + NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} + LOGIN_DOT_GOV_REGISTRATION_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://beta.notify.gov/set-up-your-profile&response_type=code&scope=openid+email&state=STATE" + + with: + cf_username: ${{ secrets.CLOUDGOV_USERNAME }} + cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} + cf_org: gsa-tts-benefits-studio + cf_space: notify-production + cf_command: >- + run-task notify-api-production --command "flask command update-templates" - name: Deploy egress proxy uses: ./.github/actions/deploy-proxy diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3ceee8908..5560d30f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -80,9 +80,23 @@ jobs: --var LOGIN_DOT_GOV_REGISTRATION_URL="$LOGIN_DOT_GOV_REGISTRATION_URL" --strategy rolling - - name: Update templates - run: cf run-task notify-api-staging --command "flask command update-templates" + uses: cloud-gov/cg-cli-tools@main + env: + DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }} + NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} + NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} + NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} + LOGIN_DOT_GOV_REGISTRATION_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-staging.app.cloud.gov/set-up-your-profile&response_type=code&scope=openid+email&state=STATE" + with: + cf_username: ${{ secrets.CLOUDGOV_USERNAME }} + cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} + cf_org: gsa-tts-benefits-studio + cf_space: notify-staging + cf_command: >- + run-task notify-api-staging --command "flask command update-templates" - name: Deploy egress proxy uses: ./.github/actions/deploy-proxy