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.
.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|^$| |"