]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Create an anchor for schedules, tags, and web rules
authorMichal Nowak <mnowak@isc.org>
Thu, 20 May 2021 08:56:12 +0000 (10:56 +0200)
committerMichal Nowak <mnowak@isc.org>
Mon, 24 May 2021 15:57:53 +0000 (17:57 +0200)
It's a common pattern to spawn CI jobs only for pipelines triggered by
schedules, tags, and web. There should be an anchor so that the rules
are not repeated.

.gitlab-ci.yml

index 7caeb8ac30bcd3803951281e7831aedf2bd3e351..1ad638a9c986a31e01af2be252647df125e74723 100644 (file)
@@ -199,6 +199,12 @@ stages:
     - main@isc-projects/bind9
     - /^v9_[1-9][0-9]$/@isc-projects/bind9
 
+.schedules-tags-web-triggering-rules: &schedules_tags_web_triggering_rules
+  only:
+    - schedules
+    - tags
+    - web
+
 .precheck: &precheck_job
   <<: *default_triggering_rules
   <<: *base_image
@@ -357,6 +363,7 @@ stages:
     when: on_failure
 
 .windows_system_test: &windows_system_test_job
+  <<: *schedules_tags_web_triggering_rules
   stage: system
   script:
     - 'Push-Location bin/tests/system'
@@ -372,10 +379,6 @@ stages:
     untracked: true
     expire_in: "1 day"
     when: on_failure
-  only:
-    - schedules
-    - tags
-    - web
 
 .unit_test_common: &unit_test_common
   <<: *default_triggering_rules
@@ -786,10 +789,7 @@ system:gcc:out-of-tree:
       artifacts: true
   <<: *base_image
   <<: *system_test_job
-  only:
-    - schedules
-    - tags
-    - web
+  <<: *schedules_tags_web_triggering_rules
 
 unit:gcc:out-of-tree:
   variables:
@@ -799,10 +799,7 @@ unit:gcc:out-of-tree:
       artifacts: true
   <<: *base_image
   <<: *unit_test_job
-  only:
-    - schedules
-    - tags
-    - web
+  <<: *schedules_tags_web_triggering_rules
 
 # Jobs for tarball GCC builds on Debian 10 "buster" (amd64)
 
@@ -813,6 +810,7 @@ gcc:tarball:
     RUN_MAKE_INSTALL: 1
   <<: *base_image
   <<: *build_job
+  <<: *schedules_tags_web_triggering_rules
   before_script:
     - tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
     - rm -f bind-*.tar.${TARBALL_EXTENSION}
@@ -820,37 +818,27 @@ gcc:tarball:
   needs:
     - job: tarball-create
       artifacts: true
-  only:
-    - schedules
-    - tags
-    - web
 
 system:gcc:tarball:
   <<: *base_image
   <<: *system_test_job
+  <<: *schedules_tags_web_triggering_rules
   before_script:
     - cd bind-*
     - *setup_interfaces
   needs:
     - job: gcc:tarball
       artifacts: true
-  only:
-    - schedules
-    - tags
-    - web
 
 unit:gcc:tarball:
   <<: *base_image
   <<: *unit_test_job
+  <<: *schedules_tags_web_triggering_rules
   before_script:
     - cd bind-*
   needs:
     - job: gcc:tarball
       artifacts: true
-  only:
-    - schedules
-    - tags
-    - web
 
 # Jobs for debug GCC builds on openSUSE Tumbleweed (amd64)
 
@@ -1242,12 +1230,9 @@ system:msvc:windows:amd64:
 msvc-debug:windows:amd64:
   <<: *windows_server_2016_amd64_image
   <<: *windows_build_job
+  <<: *schedules_tags_web_triggering_rules
   variables:
     VSCONF: Debug
-  only:
-    - schedules
-    - tags
-    - web
 
 system:msvc-debug:windows:amd64:
   <<: *windows_server_2016_amd64_image