Skip to content

Trigger a new pipeline after each increasing pipeline tier transition

From Draft to Ready

Context

Closes #1539 (closed)

Note: The MrApprovedLabel processor will not remove the pipeline:mr-approved if the approvals are being removed (behavior changed with !2837 (merged))

Requirements

  1. The gitlab terraform provider project should still work as it used to
  2. We still need to add the pipeline:mr-approved label once the MR is “first” approved for BOTH canonical and security
  • Why? pipeline:mr-approved is the label that we use to add a lot of jobs to the "post-approved" CI/CD pipelines.

Chosen solution

  • Keep the NewPipelineOnApproval processor, but ensure it's only used for the terraform-provider-gitlab project (requirement 1 , done in this MR)
  • Keep the MrApprovedLabel processor, even though it will be redundant with PipelineTierTransitions. We'll be able to remove it once this MR is merged.
  • Introduce a new Processor: PipelineTierTransitions (done in !2840 (merged))
  • Replace the PipelineTierLabel processor with the PipelineTierTransitions processor (this MR)

We now will apply the pipeline:mr-approved label with the PipelineTierTransitions processor, as it also runs on gitlab-org/gitlab and gitlab-org/security/gitlab (requirement 2 )

What does this MR do?

Looking at it commit-by-commit:

Expected impact & dry-runs

  • The message we sent when an MR is first approved will change.
  • For MRs created by team members and some automations, we'll trigger a new pipeline every time we increase tiers.

Action items

Communication

With !2838 (merged), we're changing the automation message that you received when first approving a merge request.

The message will now be talking about pipeline tiers, and what the last reviewer needs to check before the MR is set to auto-merge.

Additionally, we'll trigger a new merge request pipeline not only after the first approval, but for every pipeline tiers increase (e.g. from tier 2 to tier 3).

Please leave your thoughts in the pipeline tiers feedback issue.

Edited by David Dieulivol

Merge request reports