diff --git a/.github/workflows/deploy-dev-from-branch.yml b/.github/workflows/deploy-dev-from-branch.yml index 11960b69..2208d248 100644 --- a/.github/workflows/deploy-dev-from-branch.yml +++ b/.github/workflows/deploy-dev-from-branch.yml @@ -38,3 +38,4 @@ jobs: catalogue_token: ${{ secrets.CATALOGUE_TOKEN }} slack_alert_webhook: ${{ secrets.SLACK_ALERT_WEBHOOK }} azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }} + notify_api_key: ${{ secrets.NOTIFY_API_KEY }} diff --git a/.github/workflows/deploy-staged.yml b/.github/workflows/deploy-staged.yml index 85d5cb4a..7509cc0e 100644 --- a/.github/workflows/deploy-staged.yml +++ b/.github/workflows/deploy-staged.yml @@ -29,6 +29,7 @@ jobs: catalogue_token: ${{ secrets.CATALOGUE_TOKEN }} slack_alert_webhook: ${{ secrets.SLACK_ALERT_WEBHOOK }} azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }} + notify_api_key: ${{ secrets.NOTIFY_API_KEY }} deploy-preprod: uses: "./.github/workflows/reusable-push-and-deploy.yml" @@ -45,6 +46,7 @@ jobs: catalogue_token: ${{ secrets.CATALOGUE_TOKEN }} slack_alert_webhook: ${{ secrets.SLACK_ALERT_WEBHOOK }} azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }} + notify_api_key: ${{ secrets.NOTIFY_API_KEY }} notify-preprod-success: needs: deploy-preprod @@ -85,6 +87,7 @@ jobs: catalogue_token: ${{ secrets.CATALOGUE_TOKEN }} slack_alert_webhook: ${{ secrets.SLACK_ALERT_WEBHOOK }} azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }} + notify_api_key: ${{ secrets.NOTIFY_API_KEY }} post-deploy: name: "Post-deploy admin" diff --git a/.github/workflows/reusable-push-and-deploy.yml b/.github/workflows/reusable-push-and-deploy.yml index da409f90..68d77247 100644 --- a/.github/workflows/reusable-push-and-deploy.yml +++ b/.github/workflows/reusable-push-and-deploy.yml @@ -35,6 +35,9 @@ on: azure_client_secret: description: "azure client secret" required: true + notify_api_key: + description: "api key for the gds notify service" + required: true jobs: push-and-deploy: @@ -119,6 +122,12 @@ jobs: AZURE_REDIRECT_URI: ${{ vars.AZURE_REDIRECT_URI }} AZURE_AUTHORITY: ${{ vars.AZURE_AUTHORITY }} EXTERNAL_DOMAIN_PREFIX: ${{ vars.EXTERNAL_DOMAIN_PREFIX }} + NOTIFY_ENABLED: ${{ vars.NOTIFY_ENABLED }} + NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }} + NOTIFY_DATA_OWNER_TEMPLATE_ID: ${{ vars. NOTIFY_DATA_OWNER_TEMPLATE_ID }} + NOTIFY_SENDER_TEMPLATE_ID: ${{ vars.NOTIFY_SENDER_TEMPLATE_ID }} + NOTIFY_DATA_CATALOGUE_TEMPLATE_ID: ${{ vars.NOTIFY_DATA_CATALOGUE_TEMPLATE_ID }} + DATA_CATALOGUE_EMAIL: ${{ vars.DATA_CATALOGUE_EMAIL }} run: | cat deployments/templates/deployment.yml | envsubst > deployments/deployment.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a879109..8e8f9ada 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: exclude: tf$|j2$ - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black name: black formatting diff --git a/deployments/templates/deployment.yml b/deployments/templates/deployment.yml index 03a05a98..6a10e778 100644 --- a/deployments/templates/deployment.yml +++ b/deployments/templates/deployment.yml @@ -69,6 +69,18 @@ spec: value: "${TRACES_SAMPLE_RATE}" - name: PROFILES_SAMPLE_RATE value: "${PROFILES_SAMPLE_RATE}" + - name: "${NOTIFY_ENABLED}" + value: NOTIFY_ENABLED + - name: "${NOTIFY_API_KEY}" + value: NOTIFY_API_KEY + - name: "${NOTIFY_DATA_OWNER_TEMPLATE_ID}" + value: NOTIFY_DATA_OWNER_TEMPLATE_ID + - name: "${NOTIFY_SENDER_TEMPLATE_ID}" + value: NOTIFY_SENDER_TEMPLATE_ID + - name: "${NOTIFY_DATA_CATALOGUE_TEMPLATE_ID}" + value: NOTIFY_DATA_CATALOGUE_TEMPLATE_ID + - name: "${DATA_CATALOGUE_EMAIL}" + value: DATA_CATALOGUE_EMAIL - name: SECRET_KEY valueFrom: secretKeyRef: