Skip to content

Transform RC tags to stable branch format to fix missing CI_COMMIT_BRANCH issue on release environment jobs

What does this MR do and why?

Related issue: gitlab-com/gl-infra/delivery#21475 (closed)

This change makes the release environment more flexible by expanding support from just "RC42" tags to any "RC" tag.

Previously, the code could only handle RC42 release candidate tags when determining which stable branch to use for deployments. Now it uses a more general pattern that matches any RC tag number, making it work for all release candidates instead of just one specific type.

The tests were also updated to verify that this new functionality works correctly with different RC tag numbers, ensuring both RC42 and RC43 tags produce the same expected results for environment naming.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading