Add monthly release pipeline
🔍 What does this MR do and why?
- Adds a new pipeline for monthly releases, introducing the finalize stage.
- Adds slack notifications to the update protected branches service.
Note this MR does not create the pipeline or add it to the monthly release template. That will be added in !2560 (merged).
Related to gitlab-com/gl-infra/delivery#19546 (closed)
🛠 Testing
To test this, I pushed a modified branch to the ops instance so all slack notifications go to the test channel and the protected branches are not updated since that was tested in a previous MR:
Branch modifications
diff --git a/lib/release_tools/monthly/finalize/update_protected_branches.rb b/lib/release_tools/monthly/finalize/update_protected_branches.rb
index 985920ae..cf3da734 100644
--- a/lib/release_tools/monthly/finalize/update_protected_branches.rb
+++ b/lib/release_tools/monthly/finalize/update_protected_branches.rb
@@ -20,20 +20,20 @@ module ReleaseTools
next if SharedStatus.dry_run?
- Retriable.with_context(:api) do
- client.unprotect_branch(project, old_branch(ee: project.ee_branch?))
- end
-
- Retriable.with_context(:api) do
- client.protect_branch(
- project,
- new_branch(ee: project.ee_branch?),
- merge_access_level: MAINTAINER_ACCESS_LEVEL,
- allowed_to_merge: allowed_to_merge,
- allowed_to_push: allowed_to_push,
- code_owner_approval_required: false
- )
- end
+ # Retriable.with_context(:api) do
+ # client.unprotect_branch(project, old_branch(ee: project.ee_branch?))
+ # end
+
+ # Retriable.with_context(:api) do
+ # client.protect_branch(
+ # project,
+ # new_branch(ee: project.ee_branch?),
+ # merge_access_level: MAINTAINER_ACCESS_LEVEL,
+ # allowed_to_merge: allowed_to_merge,
+ # allowed_to_push: allowed_to_push,
+ # code_owner_approval_required: false
+ # )
+ # end
end
send_slack_notification(:success)
diff --git a/lib/release_tools/slack/pipeline_notifier.rb b/lib/release_tools/slack/pipeline_notifier.rb
index 8c403086..6150b309 100644
--- a/lib/release_tools/slack/pipeline_notifier.rb
+++ b/lib/release_tools/slack/pipeline_notifier.rb
@@ -17,7 +17,7 @@ module ReleaseTools
logger.info("Notifying the stage of a #{release_type} pipeline", stage: stage, release_manager: user_name, pipeline_url: pipeline_url)
ReleaseTools::Slack::Message.post(
- channel: ReleaseTools::Slack::F_UPCOMING_RELEASE,
+ channel: ReleaseTools::Slack::NOTIFICATION_TESTS,
message: fallback_message[stage],
blocks: slack_blocks
)
diff --git a/lib/release_tools/slack/release_pipeline_notifier.rb b/lib/release_tools/slack/release_pipeline_notifier.rb
index b8e247a2..fb530336 100644
--- a/lib/release_tools/slack/release_pipeline_notifier.rb
+++ b/lib/release_tools/slack/release_pipeline_notifier.rb
@@ -19,7 +19,7 @@ module ReleaseTools
logger.info('Posting slack message', job_type: job_type, status: status)
ReleaseTools::Slack::Message.post(
- channel: ReleaseTools::Slack::F_UPCOMING_RELEASE,
+ channel: ReleaseTools::Slack::NOTIFICATION_TESTS,
message: fallback_message,
blocks: slack_blocks
)
| Description | Reference |
|---|---|
I ran a pipeline with the MONTHLY_RELEASE_PIPELINE variable |
![]() |
| The created pipeline | ![]() |
| Pipeline link | https://ops.gitlab.net/gitlab-org/release/tools/-/pipelines/2214697 |
| Slack notifications | ![]() |
🛃 Author Check-list
- [-] Has documentation been updated?
Edited by Steve Abrams


