]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Tweak pipeline triggering settings
authorMichał Kępień <michal@isc.org>
Fri, 18 Jan 2019 13:28:47 +0000 (14:28 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 18 Jan 2019 14:26:50 +0000 (15:26 +0100)
In an attempt to ensure that:

  - all important changes to repository contents are tested,
  - pipelines are not automatically created for every single push,
  - some flexibility is allowed for corner cases,

change pipeline triggering settings so that:

  - full build & test pipelines are only automatically created for merge
    requests and tags (both for creation and updates),

  - pipelines for other repository changes (e.g. pushes to arbitrary
    branches) can only be created manually, using GitLab's web
    interface,

  - merging a merge request only causes jobs pushing the updated ARM to
    GitLab Pages to be run (as semi-linear Git history is enforced and
    thus testing a MR is identical to testing the target branch
    post-merge in terms of code),

  - repository synchronization does not trigger duplicate pipelines in
    projects which are set as mirroring targets.

(cherry picked from commit 1c8c1815e4bf65e8f367c1f3141adf70a20a4295)

.gitlab-ci.yml

index bc5342d518a75bf76812c0c0551d172e63e595f9..82c743b70a6693abfcf614902e8166cb71c409dd 100644 (file)
@@ -69,11 +69,19 @@ stages:
   image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
   <<: *linux_i386
 
+.default-triggering-rules: &default_triggering_rules
+  only:
+    - merge_requests
+    - tags
+    - web
+
 .precheck: &precheck_job
+  <<: *default_triggering_rules
   <<: *debian_sid_amd64_image
   stage: precheck
 
 .build: &build_job
+  <<: *default_triggering_rules
   stage: build
   before_script:
     - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
@@ -83,10 +91,9 @@ stages:
   artifacts:
     untracked: true
     expire_in: '1 hour'
-  only:
-  - merge_requests
 
 .system_test: &system_test_job
+  <<: *default_triggering_rules
   stage: test
   before_script:
     - bash -x bin/tests/system/ifconfig.sh up
@@ -98,10 +105,9 @@ stages:
     untracked: true
     expire_in: '1 week'
     when: on_failure
-  only:
-  - merge_requests
 
 .unit_test: &unit_test_job
+  <<: *default_triggering_rules
   stage: test
   before_script:
     - export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
@@ -117,8 +123,6 @@ stages:
     - kyua_html/
     expire_in: '1 week'
     when: on_failure
-  only:
-  - merge_requests
 
 misc:sid:amd64:
   <<: *precheck_job
@@ -141,14 +145,10 @@ misc:sid:amd64:
     - checklibs.out
     expire_in: '1 week'
     when: on_failure
-  only:
-  - merge_requests
 
 🐞:sid:amd64:
   <<: *precheck_job
   script: util/check-cocci
-  only:
-  - merge_requests
 
 docs:sid:amd64:
   <<: *debian_sid_amd64_image
@@ -163,8 +163,10 @@ docs:sid:amd64:
     expire_in: '1 month'
   only:
   - merge_requests
+  - tags
+  - web
   - master@isc-projects/bind9
-  - /^v9_.*$/@isc-projects/bind9
+  - /^v9_[1-9][0-9]$/@isc-projects/bind9
 
 push:docs:sid:amd64:
   <<: *debian_sid_amd64_image
@@ -174,7 +176,7 @@ push:docs:sid:amd64:
     - curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
   only:
   - master@isc-projects/bind9
-  - /^v9_.*$/@isc-projects/bind9
+  - /^v9_[1-9][0-9]$/@isc-projects/bind9
 
 gcc:centos6:amd64:
   variables:
@@ -262,42 +264,27 @@ gcc:sid:amd64:
     EXTRA_CONFIGURE: "--with-libidn2"
   <<: *debian_sid_amd64_image
   <<: *build_job
-  only:
-  - merge_requests
-  - master@isc-projects/bind9
-  - /^v9_.*$/@isc-projects/bind9
 
 install:gcc:sid:amd64:
+  <<: *default_triggering_rules
   <<: *debian_sid_amd64_image
   stage: test
   script:
     - make install
   dependencies:
     - gcc:sid:amd64
-  only:
-  - merge_requests
-  - master@isc-projects/bind9
-  - /^v9_.*$/@isc-projects/bind9
 
 system:gcc:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *system_test_job
   dependencies:
     - gcc:sid:amd64
-  only:
-  - merge_requests
-  - master@isc-projects/bind9
-  - /^v9_.*$/@isc-projects/bind9
 
 unit:gcc:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *unit_test_job
   dependencies:
     - gcc:sid:amd64
-  only:
-  - merge_requests
-  - master@isc-projects/bind9
-  - /^v9_.*$/@isc-projects/bind9
 
 gcc:sid:i386:
   variables: