[Git][NTPsec/ntpsec][master] Update gitlab CI only/except to use rules instead

Matt Selsky gitlab at mg.gitlab.com
Sun Aug 9 15:02:13 UTC 2020



Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
42088fe0 by Matt Selsky at 2020-08-09T01:25:04-04:00
Update gitlab CI only/except to use rules instead

- - - - -


3 changed files:

- .gitlab-ci-docker-images.yml
- .gitlab-ci.yml
- .gitlab-opttest-ci.yml


Changes:

=====================================
.gitlab-ci-docker-images.yml
=====================================
@@ -20,8 +20,8 @@
     - docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest
   allow_failure: true
   retry: 2
-  only:
-    - schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule"'
 
 build-alpine:
   <<: *build_definition


=====================================
.gitlab-ci.yml
=====================================
@@ -1,8 +1,8 @@
 pages:
   stage: build
   image: $CI_REGISTRY/ntpsec/ntpsec/alpine-pages
-  except:
-    - schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule"'
   script:
     - python3 ./waf configure --prefix=/tmp/docbot-local --htmldir=`pwd`/public/latest/ --enable-doc --disable-manpage build install
     - cp www/favicon.ico public
@@ -27,8 +27,8 @@ include:
 
 .job_template: &job_definition
   stage: build
-  except:
-    - schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE != "schedule"'
   tags:
     - gitlab-org
 
@@ -191,8 +191,8 @@ freebsd-11-basic:
     - python ./waf configure --disable-doc --disable-manpage --disable-nts build
   tags:
     - freebsd-11
-  only:
-    - branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 freebsd-11-refclocks:
   <<: *job_definition
@@ -200,8 +200,8 @@ freebsd-11-refclocks:
     - python ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
   tags:
     - freebsd-11
-  only:
-    - branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 freebsd-12-basic:
   <<: *job_definition
@@ -209,8 +209,8 @@ freebsd-12-basic:
     - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - freebsd-12
-  only:
-    - branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 freebsd-12-refclocks:
   <<: *job_definition
@@ -218,8 +218,8 @@ freebsd-12-refclocks:
     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - freebsd-12
-  only:
-    - branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 centos-latest-basic:
   <<: *job_definition
@@ -343,8 +343,8 @@ cross-build:
     - PYTHON_VERSION=2.7 PYTAG=cpython27 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --disable-doc --disable-manpage --disable-nts --cross-compiler=arm-linux-gnueabihf-gcc-5 --cross-cflags '-I/srv/arm-local/include -I/srv/arm-local/include/python2.7' --cross-ldflags '-L/srv/arm-local/lib' --pythondir=/srv/arm-local/lib/python2.7/dist-packages --pythonarchdir=/srv/arm-local/lib/python2.7/dist-packages build
   tags:
     - ubuntu-1604-lts
-  only:
-    - branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 gentoo-basic:
   <<: *job_definition
@@ -378,8 +378,8 @@ coverity-scan:
     - curl --form token="$COVERITY_TOKEN" --form email=security at ntpsec.org --form file=@ntpsec_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=ntpsec
   tags:
     - ubuntu-1604-lts
-  only:
-    - schedules AND branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 macos-basic:
   <<: *job_definition
@@ -387,8 +387,8 @@ macos-basic:
     - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage build
   tags:
     - macos
-  only:
-    - branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 macos-refclocks:
   <<: *job_definition
@@ -396,8 +396,8 @@ macos-refclocks:
     - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - macos
-  only:
-    - branches at NTPsec/ntpsec
+  rules:
+    - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 feature-classic-mode:
   <<: *job_definition


=====================================
.gitlab-opttest-ci.yml
=====================================
@@ -5,8 +5,8 @@
     - PYTHON=python3 bash tests/option-tester.sh
   tags:
     - gitlab-org
-  only:
-    - schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule"'
 
 alpine-edge-options-tester:
   <<: *option_tester
@@ -71,8 +71,8 @@ macos-options-tester:
     - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig PYTHON=python3 tests/option-tester.sh
   tags:
     - macos
-  only:
-    - branches at NTPsec/ntpsec AND schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 fbsd-11-options-tester:
   stage: test
@@ -81,8 +81,8 @@ fbsd-11-options-tester:
     - PYTHON=python3 tests/option-tester.sh
   tags:
     - freebsd-11
-  only:
-    - branches at NTPsec/ntpsec AND schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 fbsd-12-options-tester:
   stage: test
@@ -91,8 +91,8 @@ fbsd-12-options-tester:
     - PYTHON=python3 tests/option-tester.sh
   tags:
     - freebsd-11
-  only:
-    - branches at NTPsec/ntpsec AND schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
 
 .deb_option_tester: &deb_option_tester
   stage: test
@@ -103,8 +103,8 @@ fbsd-12-options-tester:
     - PYTHON=python3 bash tests/option-tester.sh
   tags:
     - gitlab-org
-  only:
-    - schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule"'
 
 .deb_old_option_tester: &deb_old_option_tester
   stage: test
@@ -115,8 +115,8 @@ fbsd-12-options-tester:
     - PYTHON=python3 bash tests/option-tester.sh
   tags:
     - gitlab-org
-  only:
-    - schedules
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule"'
 
 debian-i386-options-tester:
   image: i386/debian:stable-slim



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/42088fe07c348e19532824ff15c9398683d8dc7a

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/42088fe07c348e19532824ff15c9398683d8dc7a
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20200809/5e3cf18f/attachment-0001.htm>


More information about the vc mailing list