Skip to content

Update trigger-buid to evaluate MR branches

Jennifer Li requested to merge jennli-define-trigger-branch-for-mr into master

What does this MR do and why?

Re: #429717 (closed)

Update trigger-build to ensure it correctly parses TRIGGER_BRANCH for stable branches (this was already working before my MR) and for MR pipelines targeting stable branches (this is the change that I'm making in the MR).

In 16-3-stable-ee, we had a bug where the CNG pipeline triggered by gitlab 16-3-stable-ee branch was pulling the master CNG-mirror repo (see comment

While the bug is no longer reproducible in 16-6-stable-ee branch, we should ensure the behavior is consistent in MR pipelines targeting stable branch, so the CNG pipeline also pulls CNG-mirror stable branch for backport fixes.

This change was tested in https://gitlab.com/gitlab-org/gitlab/-/jobs/5579541673#L83 and also via rspec.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jennifer Li

Merge request reports