ministryofjustice / find-moj-data

Find MOJ data service • This repository is defined and managed in Terraform
MIT License
4 stars 0 forks source link

Deployment notifications #496

Open MatMoore opened 6 days ago

MatMoore commented 6 days ago

Part of https://github.com/ministryofjustice/find-moj-data/issues/494

Create deployment notifications. Spike?

A deployment to test / preprod / prod should trigger a notification to a channel. The notification should contain all relevant commit messages, clearly state which environment is being referenced, and clearly show the success / fail state of the deployment.

The comms method - which Slack or MS Teams channel - could vary depending on environment, so plan for this. For example:

Initially just Slack for now until / if we get a Teams channel to notify DIP team. But if there's spare time and someone wants to try creating Teams notifications, I've added some notes in a comment below

What notifications we want

Test

Pre prod

Prod

jemnery commented 5 days ago

If anyone has spare time and wants to try setting up Teams notifications, I've created a Catalogue Notifications channel and added an incoming webook. This is stored in 1Password and also an environment secret for preprod in the f-m-d repo.

Jeremy, Sean and Yvan are team owners so can help with access.

Image

Example GHA step:

preprod-release-notify:
    name: Send staging release message to Teams
    runs-on: ubuntu-latest
    needs: build-deploy-preprod
    steps:
      - name: Microsoft Teams Notification
        uses: skitionek/notify-microsoft-teams@master
        if: always()
        with:
          webhook_url: ${{ secrets.MICROSOFT_TEAMS_WEBHOOK_URI }}
          needs: ${{ toJson(needs) }}
          job: ${{ toJson(job) }}
          overwrite: "{title: `Deployed a new release to preproduction`}"