[9.20] fix: ci: Use resource-group for RPM-related CI jobs

RPM build jobs push commits to Git repositories.  If multiple such jobs
are triggered simultaneously, some of these pushes may fail due to the
same Git branch getting updated by one job while another one attempts to
do the same thing in parallel.  Use GitLab's resource group mechanism to
prevent such races: group jobs by the Git repository they push to, which
is indicated by the $SERVICE variable set for each job.

Backport of MR !12295

Merge branch 'backport-andoni/use-resource-group-for-rpms-copr-ci-job-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12311
This commit is contained in:
Andoni Duarte 2026-06-24 10:45:20 +00:00
commit 9069235acc

View file

@ -2245,6 +2245,8 @@ assign-milestones:
.rpm-build-job-common: &rpm_build_job_common
<<: *manual_release_job_qa
# prevent Git push races between pipelines started for different tags
resource_group: "rpm-build-${SERVICE}"
after_script:
- git -C bind/ remote get-url origin | sed "s|\.git$|/-/commit/$(cat commit.txt)|"
- git -C bind/ show --color "$(cat commit.txt)" | sed "s|^$| |"