CI: Update CNG mirror skip job regex

What does this MR do and why?

Fixes gitlab-org/quality/quality-engineering/team-tasks#4339 (closed)

GitLab CI's =~ operator does partial/substring matching by default. So a regex like /gitlab-go/ matches any job name that contains gitlab-go — including gitlab-gomplate.

When gitlab-go's image already exists in the registry, it gets added to the skip list, building a regex like:

/final-images-listing|gitlab-go|gitaly|.../

This inadvertently also matches gitlab-gomplate and gitaly-init-cgroups, causing those jobs to be skipped with when: never. When those skipped jobs are then needed as dependencies (e.g. gitlab-base depends on gitlab-gomplate), the pipeline fails.

The fix adds ^ (start) and $ (end) anchors with a capturing group:

/^(final-images-listing|gitlab-go|gitaly|...)$/

Now the regex only matches a job name that is exactly one of the listed strings — gitlab-go can no longer accidentally match gitlab-gomplate.

Note: this will need to be backported to fix stable branches

Testing

Tested in draft MR in 18.7 branch https://gitlab.com/gitlab-org/build/CNG-mirror/-/pipelines/2391718585

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.

Edited by Jay McCure

Merge request reports

Loading