Add release environment notification
What does this MR do and why?
Release Environment Epic: gitlab-com/gl-infra&943 (closed)
Ref issue: gitlab-com/gl-infra/delivery#19999 (closed)
This MR aims to improve the downstream pipeline start-release-environments-pipeline
, which is triggered on new commits to stable branches (e.g. 16-10-stable-ee). An example of this pipeline: https://gitlab.com/gitlab-org/gitlab/-/pipelines/1247712371. With this change, every time a new MR is merged to a stable branch, a deployment to release environment is done, and notifications are sent before and after the deployment to the Slack channel #announcements
, to notify Delivery team.
Add notification for release environment
- Add 2 new stages in the release environment pipeline:
release-environments-notification-start
andrelease-environments-notification-finish
- Add a script to trigger the notification pipeline in release-tools. See the related MR release-tools!3013 (merged)
Target pipeline
I try to mimic the same workflow that we use for auto-deploy, so it is familiar and easy to debug. The green boxes are in release-tools
(check the related MR release-tools!3013 (merged)). The gray ones are in gitlab
repo.
Example pipelines
Please note that, mimicking the pipeline is hard due to many dependencies, so please only focus on the ones related to this MR, which are the notifications. You cannot reproduce the same pipeline, since it requires some setup which I removed already for safety reason.
- When the deploy fails: https://gitlab.com/gitlab-org/gitlab/-/pipelines/1271732263
- When the deploy succeed: https://gitlab.com/gitlab-org/gitlab/-/pipelines/1271841767 (deploy pipeline didn't really run)
- When the QA fails: https://gitlab.com/gitlab-org/gitlab/-/pipelines/1271873304 (deploy pipeline and qa job didn't really run)