]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Deduplicate definitions of release-related jobs
authorMichał Kępień <michal@isc.org>
Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)
Extract common YAML keys used by release-related job definitions into
reusable anchors to ensure consistency and limit repetition across
multiple similar jobs.

.gitlab-ci.yml

index 98bd0fabf21c1b7585f97ebfb81cfb6ed9b0a9d1..0bd600f32c74636660579bd1a893ce73bcf3379b 100644 (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: