Skip to content

Add notification for release environment

Dat Tang requested to merge new-release-environment-send-noti into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Close gitlab-com/gl-infra/delivery#19999 (closed)

Content

The code changes introduce a new feature to send Slack notifications for release environment deployments. These notifications provide information about the deployment status, environment name, and the version being deployed. Additionally, a new Rake task is added to allow triggering of these notifications from the GitLab CI pipeline.

Add notification for release environment

  • Add a new GitLab CI workflow only to send notification for release environment, to not mix up with other pipelines.
  • Add a new ReleaseTools::ReleaseEnvironment::DeployNotifier as well as a corresponding Slack notifier class to send notification based on the release_environment's pipeline on gitlab.com.
  • Add a new ReleaseTools::ReleaseEnvironment::QaNotifier as well as a corresponding Slack notifier class to send notification based on the release_environment's QA on gitlab.com.
  • Add rspec for new classes.

Note

How to test

RELEASE_BOT_PRODUCTION_TOKEN='' RELEASE_BOT_OPS_TOKEN='' SLACK_APP_BOT_TOKEN='' bundle exec rake "release_environment:deploy_notify[1263393829, my-env, my-version]"
RELEASE_BOT_PRODUCTION_TOKEN='' RELEASE_BOT_OPS_TOKEN='' SLACK_APP_BOT_TOKEN='' bundle exec rake "release_environment:qa_notify[1263393829, my-env, my-version]"

Author Check-list

  • Has documentation been updated?
  • Update the notification channel from ReleaseTools::Slack::NOTIFICATION_TESTS to ReleaseTools::Slack::ANNOUNCEMENTS
Edited by Dat Tang

Merge request reports