Skip to content

Add Slack notifications to the release-tools coordinated pipeline

Problem

When a deployment to any of our environments starts or finishes, a slack notification is sent to the #announcements channel. Several examples of this notification can be found on the announcements slack channel.

Slack notification logic is centralized in two places: Notification is sent using a python script on the deploy-tooling repository, then it's referenced by the deployer pipeline.

Proposal

To reduce the complexity of the Slack notification setup and as part of the Single Pipeline::Phase 2, let's add the Slack notification to the coordinated pipeline:

  • Coordinated pipeline should send a notification when a deployment starts, ends, or fails.
  • If a notification is sent from the coordinated pipeline, the deployer pipeline notification should be skipped.

Note that we can't get rid of the deployer notification due to the different ways a deployment can be triggered:

  • Standard way: Using coordinated pipelines through release-tools - This one will use the new notifications
  • Alternative way: Using a chatops command - This one will use the deployer notifications - This option is normally used if:
    • Production is blocked due to incidents - Example (Internal only)
    • If we want to speed up the deployment of a package
    • If we want to deploy a specific package into one of our environments (rollbacks)

Follow-up issue to remove notifications from deployer #2070

Implementation details

Moving this notification implies:

For context, deployments to our environments are performed using bridge-jobs, meaning a downstream pipeline is triggered on the deployer repo to perform a deployment - example of the bridge job for staging

Transition to the #announcements Slack channel

Once the testing has been deemed stable, we could start using the new notifications in the auto-deploy process

Oct 6th

  • Before the creation of the auto-deploy branch scheduled at 15 UTC, merge both merge requests
  • Keep an eye on the auto-deploy branch created at that schedule, and make sure the notifications are correct, and sent properly to the #announcements channel

Result: Slack notifications are sent to the #announcements channel through the coordinated pipeline. No error has been reported so far.

What to do if something goes wrong?

Development log

Follow ups

Edited by Mayra Cabrera