Skip to content

Move new auto-deploy branch slack notifications

What does this MR do and why?

Moves the new auto-deploy branch slack notifications from #releases to #f_upcoming_release.

See this slack thread for additional context.

Testing

To test this change I grabbed the AUTO_DEPLOY_NOTIFICATION_URL variable from https://ops.gitlab.net/gitlab-org/release/tools/-/settings/ci_cd and opened a console:

AUTO_DEPLOY_NOTIFICATION_URL=<redacted> CI_JOB_URL=https://fake-job-url.gitlab.com be pry --gem

Then in the console, I forced a slack notification with dummy data:

[1] pry(main)> Result = Struct.new(:project, :branch, :response, :notify_branch_too_far_behind)
=> Result
[2] pry(main)> result = Result.new
=> #<struct Result project=nil, branch=nil, response=nil, notify_branch_too_far_behind=nil>
[3] pry(main)> result.branch = 'test-branch'
=> "test-branch"
[4] pry(main)> result.project = 'test-project'
=> "test-project"
[5] pry(main)> ReleaseTools::Slack::AutoDeployNotification.on_create([result])
=> nil

This resulted in a successful notification in #f_upcoming_release:

Screenshot_2023-02-14_at_4.23.19_PM

Author Check-list

  • [-] Has documentation been updated?
Edited by Steve Abrams

Merge request reports