[Git][NTPsec/ntpsec][master] Repeat ourselves less in CI jobs

Matt Selsky gitlab at mg.gitlab.com
Tue Apr 28 11:45:42 UTC 2020



Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
438dfb69 by Matt Selsky at 2020-04-28T02:15:24-04:00
Repeat ourselves less in CI jobs

Add "tags: gitlab-org" to the default definition to save repeating it so many
times.

Add a template "job_definition_allow_failure" that allows failures to remove
the need to repeat ourselves there as well.

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -30,6 +30,12 @@ include:
   stage: build
   except:
     - schedules
+  tags:
+    - gitlab-org
+
+.job_template_allow_failure: &job_definition_allow_failure
+  <<: *job_definition
+  allow_failure: true
 
 alpine-basic:
   <<: *job_definition
@@ -37,8 +43,6 @@ alpine-basic:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 alpine-refclocks:
   <<: *job_definition
@@ -46,28 +50,20 @@ alpine-refclocks:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 alpine-edge-basic:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: alpine:edge
-  allow_failure: true
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 alpine-edge-refclocks:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: alpine:edge
-  allow_failure: true
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 AsciiDoc-3-Fedora:
   <<: *job_definition
@@ -80,8 +76,6 @@ AsciiDoc-3-Fedora:
     - ln -sv asciidoc3.py asciidoc3/asciidoc3
     - asciidoc3/asciidoc3 --version || echo -n
     - PATH="$PWD/asciidoc3:$PATH" python3 ./waf configure --enable-doc --enable-manpage build
-  tags:
-    - gitlab-org
 
 AsciiDoc-classic2-Alpine:
   <<: *job_definition
@@ -89,8 +83,6 @@ AsciiDoc-classic2-Alpine:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev asciidoc
     - python ./waf configure --enable-doc --enable-manpage build
-  tags:
-    - gitlab-org
 
 AsciiDoc-classic3-Alpine:
   <<: *job_definition
@@ -98,8 +90,6 @@ AsciiDoc-classic3-Alpine:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev asciidoc
     - python3 ./waf configure --enable-doc --enable-manpage build
-  tags:
-    - gitlab-org
 
 AsciiDoc-no:
   <<: *job_definition
@@ -107,8 +97,6 @@ AsciiDoc-no:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev
     - python ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 AsciiDoc-py3-Ubuntu:
   <<: *job_definition
@@ -117,8 +105,6 @@ AsciiDoc-py3-Ubuntu:
     - apt-get update
     - DEBIAN_FRONTEND="noninteractive" apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev asciidoc-base
     - python3 ./waf configure --enable-doc --enable-manpage build
-  tags:
-    - gitlab-org
 
 debian-oldstable-basic:
   <<: *job_definition
@@ -127,8 +113,6 @@ debian-oldstable-basic:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build
-  tags:
-    - gitlab-org
 
 debian-oldstable-refclocks:
   <<: *job_definition
@@ -137,8 +121,6 @@ debian-oldstable-refclocks:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
-  tags:
-    - gitlab-org
 
 debian-stable-basic:
   <<: *job_definition
@@ -147,8 +129,6 @@ debian-stable-basic:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 debian-stable-refclocks:
   <<: *job_definition
@@ -157,8 +137,6 @@ debian-stable-refclocks:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 debian-testing-basic:
   <<: *job_definition
@@ -167,8 +145,6 @@ debian-testing-basic:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 debian-testing-refclocks:
   <<: *job_definition
@@ -177,30 +153,22 @@ debian-testing-refclocks:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 debian-unstable-basic:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: debian:unstable-slim
-  allow_failure: true
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 debian-unstable-refclocks:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: debian:unstable-slim
-  allow_failure: true
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 ubuntu-latest-basic:
   <<: *job_definition
@@ -209,8 +177,6 @@ ubuntu-latest-basic:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 ubuntu-latest-refclocks:
   <<: *job_definition
@@ -219,8 +185,6 @@ ubuntu-latest-refclocks:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 ubuntu-rolling-basic:
   <<: *job_definition
@@ -229,8 +193,6 @@ ubuntu-rolling-basic:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 ubuntu-rolling-refclocks:
   <<: *job_definition
@@ -239,30 +201,22 @@ ubuntu-rolling-refclocks:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 ubuntu-devel-basic:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: ubuntu:devel
-  allow_failure: true
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 ubuntu-devel-refclocks:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: ubuntu:devel
-  allow_failure: true
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 freebsd-11-basic:
   <<: *job_definition
@@ -306,8 +260,6 @@ centos-latest-basic:
   script:
     - dnf -y install bison gcc openssl-devel libcap-devel python3-devel
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 centos-latest-refclocks:
   <<: *job_definition
@@ -315,8 +267,6 @@ centos-latest-refclocks:
   script:
     - dnf -y --enablerepo=PowerTools install bison gcc openssl-devel libcap-devel python3-devel pps-tools-devel
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 fedora-latest-basic:
   <<: *job_definition
@@ -324,8 +274,6 @@ fedora-latest-basic:
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 fedora-latest-refclocks:
   <<: *job_definition
@@ -333,48 +281,34 @@ fedora-latest-refclocks:
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 fedora-rawhide-basic:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: registry.fedoraproject.org/fedora:rawhide
-  allow_failure: true
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 fedora-rawhide-refclocks:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: registry.fedoraproject.org/fedora:rawhide
-  allow_failure: true
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 fedora-rawhide-refclocks-gpsd:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: registry.fedoraproject.org/fedora:rawhide
-  allow_failure: true
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel python3-gpsd
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 python3-rc:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: python:rc
-  allow_failure: true
   script:
     - apt-get update -qq && apt-get install -y -qq bison libcap-dev pps-tools
     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 python-coverage:
   <<: *job_definition
@@ -383,8 +317,6 @@ python-coverage:
     - python ./waf configure --disable-doc --disable-manpage build
     - for i in build/main/tests/pylib/test_*; do python-coverage run -a --source build/main/pylib "$i"; done
     - python-coverage report
-  tags:
-    - gitlab-org
 
 clang-basic:
   <<: *job_definition
@@ -393,8 +325,6 @@ clang-basic:
     - apt-get update
     - apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python-dev clang
     - python ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang build
-  tags:
-    - gitlab-org
 
 clang-refclocks:
   <<: *job_definition
@@ -403,8 +333,6 @@ clang-refclocks:
     - apt-get update
     - apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python-dev clang
     - python ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang --refclock=all build
-  tags:
-    - gitlab-org
 
 openSUSE-leap-basic:
   <<: *job_definition
@@ -412,8 +340,6 @@ openSUSE-leap-basic:
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build 
-  tags:
-    - gitlab-org
 
 openSUSE-leap-refclocks:
   <<: *job_definition
@@ -421,28 +347,20 @@ openSUSE-leap-refclocks:
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
     - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
-  tags:
-    - gitlab-org
 
 openSUSE-tumbleweed-basic:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: opensuse/tumbleweed
-  allow_failure: true
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
     - python3 ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 openSUSE-tumbleweed-refclocks:
-  <<: *job_definition
+  <<: *job_definition_allow_failure
   image: opensuse/tumbleweed
-  allow_failure: true
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 debian-stable-basic-32bit:
   <<: *job_definition
@@ -451,8 +369,6 @@ debian-stable-basic-32bit:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev
     - python ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 debian-stable-refclocks-32bit:
   <<: *job_definition
@@ -461,8 +377,6 @@ debian-stable-refclocks-32bit:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev
     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 debian-stable-mDNS-basic:
   <<: *job_definition
@@ -471,8 +385,6 @@ debian-stable-mDNS-basic:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev libavahi-compat-libdnssd-dev
     - python ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 debian-stable-mDNS-refclocks:
   <<: *job_definition
@@ -481,12 +393,9 @@ debian-stable-mDNS-refclocks:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev libavahi-compat-libdnssd-dev
     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 cross-build:
-  <<: *job_definition
-  allow_failure: true
+  <<: *job_definition_allow_failure
   script:
     - 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:
@@ -501,8 +410,6 @@ gentoo-basic:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
     - python ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 gentoo-refclocks:
   <<: *job_definition
@@ -511,8 +418,6 @@ gentoo-refclocks:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 gentoo-hardened-basic:
   <<: *job_definition
@@ -521,8 +426,6 @@ gentoo-hardened-basic:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
     - python ./waf configure --disable-doc --disable-manpage build
-  tags:
-    - gitlab-org
 
 gentoo-hardened-refclocks:
   <<: *job_definition
@@ -531,8 +434,6 @@ gentoo-hardened-refclocks:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
     - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-  tags:
-    - gitlab-org
 
 coverity-scan:
   script:
@@ -569,8 +470,6 @@ feature-classic-mode:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-classic-mode build
-  tags:
-    - gitlab-org
 
 feature-seccomp:
   <<: *job_definition
@@ -578,8 +477,6 @@ feature-seccomp:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libseccomp-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-seccomp build
-  tags:
-    - gitlab-org
 
 feature-debug:
   <<: *job_definition
@@ -587,8 +484,6 @@ feature-debug:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug build
-  tags:
-    - gitlab-org
 
 feature-debug-gdb:
   <<: *job_definition
@@ -596,8 +491,6 @@ feature-debug-gdb:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-gdb build
-  tags:
-    - gitlab-org
 
 feature-debug-timing:
   <<: *job_definition
@@ -605,8 +498,6 @@ feature-debug-timing:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-timing build
-  tags:
-    - gitlab-org
 
 feature-disable-droproot:
   <<: *job_definition
@@ -614,8 +505,6 @@ feature-disable-droproot:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-droproot build
-  tags:
-    - gitlab-org
 
 feature-early-droproot:
   <<: *job_definition
@@ -623,8 +512,6 @@ feature-early-droproot:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-early-droproot build
-  tags:
-    - gitlab-org
 
 feature-leap-smear:
   <<: *job_definition
@@ -632,8 +519,6 @@ feature-leap-smear:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-leap-smear build
-  tags:
-    - gitlab-org
 
 feature-mssntp:
   <<: *job_definition
@@ -641,5 +526,3 @@ feature-mssntp:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-mssntp build
-  tags:
-    - gitlab-org



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/438dfb69763ab5c036ea21faa50dde4139fab26d

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/438dfb69763ab5c036ea21faa50dde4139fab26d
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/20200428/131b9662/attachment-0001.htm>


More information about the vc mailing list