Deduplicate definitions of release-related jobs

Extract common YAML keys used by release-related job definitions into
reusable anchors to ensure consistency and limit repetition across
multiple similar jobs.
This commit is contained in:
Michał Kępień 2025-11-04 12:51:35 +01:00
parent b026651c44
commit ca7dbdc3c1
No known key found for this signature in database

View file

@ -1645,9 +1645,12 @@ release:
- bind-${CI_COMMIT_TAG}-release
expire_in: "1 month"
.signer-ssh-job: &signer_ssh_job
.manual_release_job: &manual_release_job
stage: release
when: manual
.signer-ssh-job: &signer_ssh_job
<<: *manual_release_job
allow_failure: false
tags:
- signer
@ -1757,40 +1760,43 @@ publish:
rules:
- *rule_tag_open_source
# Job creating the release announcement MR in Printing Press
prepare-release-announcement:
.manual_release_job_qa: &manual_release_job_qa
<<: *manual_release_job
<<: *base_image
stage: release
when: manual
variables:
GIT_DEPTH: 1
DOCUMENT: release-announcement
before_script:
- git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git
needs:
- job: staging
artifacts: false
.printing_press_job: &printing_press_job
<<: *manual_release_job_qa
variables:
GIT_DEPTH: 1
script:
- bind9-qa/releng/printing_press_mr.py --document "${DOCUMENT}" --metadata bind9-qa/releng/metadata.json
needs: []
rules:
- *rule_tag_open_source
artifacts:
paths:
- printing-press/
when: on_failure
# Job creating the release announcement MR in Printing Press
prepare-release-announcement:
<<: *printing_press_job
variables:
DOCUMENT: release-announcement
rules:
- *rule_tag_open_source
# Job merging the tag back into its base branch
merge-tag:
<<: *base_image
stage: release
when: manual
<<: *manual_release_job_qa
variables:
GIT_DEPTH: 100
before_script:
- git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git
script:
- bind9-qa/releng/merge_tag.py --tag "$CI_COMMIT_TAG"
needs: []
rules:
- *rule_tag_open_source
artifacts: