]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace dependencies+needs with needs+artifacts in GitLabCI config
authorOndřej Surý <ondrej@sury.org>
Tue, 7 Aug 2018 14:46:53 +0000 (16:46 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 20 Mar 2020 15:09:42 +0000 (16:09 +0100)
All jobs now use solely the newer needs configuration to declare
dependencies between jobs:

    needs:
      - job: <foo>
        artifacts: true

instead of combination of dependencies and needs which is deprecated.
This change completely unbundles the stages (alas the stages still needs
to stay because the job graph has to stay acyclic between the stages).

(cherry picked from commit 66ba808c1b69e53427d7f0bb40c7134996ca764a)

.gitlab-ci.yml

index e45614d71a69a99cb89fe31c0677262d9ccf3da6..e654b30a6bebafe667c7835394f036314111c6f1 100644 (file)
@@ -169,11 +169,7 @@ stages:
   script:
     - autoreconf -fi
   artifacts:
-    paths:
-      - aclocal.m4
-      - configure
-      - ltmain.sh
-      - m4/libtool.m4
+    untracked: true
     expire_in: "1 day"
 
 .configure: &configure |
@@ -202,10 +198,9 @@ stages:
     - ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
     - test -z "${RUN_MAKE_INSTALL}" || make install
     - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install
-  dependencies:
-    - autoreconf:sid:amd64
   needs:
-    - autoreconf:sid:amd64
+    - job: autoreconf:sid:amd64
+      artifacts: true
   artifacts:
     untracked: true
     expire_in: "1 day"
@@ -232,9 +227,9 @@ stages:
          x64'
     - 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
     - '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
-  dependencies: []
   needs:
-    - autoreconf:sid:amd64
+    - job: autoreconf:sid:amd64
+      artifacts: false
   artifacts:
     untracked: true
     expire_in: "1 day"
@@ -376,6 +371,7 @@ misc:sid:amd64:
     - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
     - xmllint --noout --nonet --html `git ls-files '*.html'`
     - sh util/check-win32util-configure
+  needs: []
   artifacts:
     paths:
       - util/newcopyrights
@@ -386,13 +382,14 @@ misc:sid:amd64:
 🐞:sid:amd64:
   <<: *precheck_job
   <<: *debian_buster_amd64_image
+  needs: []
   script:
     - util/check-cocci
     - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
 
 tarball-create:sid:amd64:
-  <<: *debian_sid_amd64_image
   stage: precheck
+  <<: *debian_sid_amd64_image
   script:
     - source version
     - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
@@ -417,10 +414,9 @@ docs:sid:amd64:
     - ./configure || cat config.log
     - make -C doc/misc docbook
     - make -C doc/arm Bv9ARM.html
-  dependencies:
-    - autoreconf:sid:amd64
   needs:
-    - autoreconf:sid:amd64
+    - job: autoreconf:sid:amd64
+      artifacts: true
   artifacts:
     paths:
       - doc/arm/
@@ -429,7 +425,9 @@ docs:sid:amd64:
 push:docs:sid:amd64:
   <<: *debian_sid_amd64_image
   stage: push
-  dependencies: []
+  needs:
+    - job: docs:sid:amd64
+      artifacts: false
   script:
     - curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
   only:
@@ -449,16 +447,16 @@ gcc:alpine3.11:amd64:
 system:gcc:alpine3.11:amd64:
   <<: *alpine_3_11_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:alpine3.11:amd64
-  needs: ["gcc:alpine3.11:amd64"]
+  needs:
+    - job: gcc:alpine3.11:amd64
+      artifacts: true
 
 unit:gcc:alpine3.11:amd64:
   <<: *alpine_3_11_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:alpine3.11:amd64
-  needs: ["gcc:alpine3.11:amd64"]
+  needs:
+    - job: gcc:alpine3.11:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on CentOS 6 (amd64)
 
@@ -473,16 +471,16 @@ gcc:centos6:amd64:
 system:gcc:centos6:amd64:
   <<: *centos_centos6_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:centos6:amd64
-  needs: ["gcc:centos6:amd64"]
+  needs:
+    - job: gcc:centos6:amd64
+      artifacts: true
 
 unit:gcc:centos6:amd64:
   <<: *centos_centos6_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:centos6:amd64
-  needs: ["gcc:centos6:amd64"]
+  needs:
+    - job: gcc:centos6:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on CentOS 7 (amd64)
 
@@ -497,16 +495,16 @@ gcc:centos7:amd64:
 system:gcc:centos7:amd64:
   <<: *centos_centos7_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:centos7:amd64
-  needs: ["gcc:centos7:amd64"]
+  needs:
+    - job: gcc:centos7:amd64
+      artifacts: true
 
 unit:gcc:centos7:amd64:
   <<: *centos_centos7_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:centos7:amd64
-  needs: ["gcc:centos7:amd64"]
+  needs:
+    - job: gcc:centos7:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on CentOS 8 (amd64)
 
@@ -521,16 +519,16 @@ gcc:centos8:amd64:
 system:gcc:centos8:amd64:
   <<: *centos_centos8_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:centos8:amd64
-  needs: ["gcc:centos8:amd64"]
+  needs:
+    - job: gcc:centos8:amd64
+      artifacts: true
 
 unit:gcc:centos8:amd64:
   <<: *centos_centos8_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:centos8:amd64
-  needs: ["gcc:centos8:amd64"]
+  needs:
+    - job: gcc:centos8:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on Debian 8 Jessie (amd64)
 
@@ -545,16 +543,16 @@ gcc:jessie:amd64:
 system:gcc:jessie:amd64:
   <<: *debian_jessie_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:jessie:amd64
-  needs: ["gcc:jessie:amd64"]
+  needs:
+    - job: gcc:jessie:amd64
+      artifacts: true
 
 unit:gcc:jessie:amd64:
   <<: *debian_jessie_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:jessie:amd64
-  needs: ["gcc:jessie:amd64"]
+  needs:
+    - job: gcc:jessie:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on Debian 9 Stretch (amd64)
 
@@ -568,16 +566,16 @@ gcc:stretch:amd64:
 system:gcc:stretch:amd64:
   <<: *debian_stretch_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:stretch:amd64
-  needs: ["gcc:stretch:amd64"]
+  needs:
+    - job: gcc:stretch:amd64
+      artifacts: true
 
 unit:gcc:stretch:amd64:
   <<: *debian_stretch_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:stretch:amd64
-  needs: ["gcc:stretch:amd64"]
+  needs:
+    - job: gcc:stretch:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on Debian 10 Buster (amd64)
 
@@ -591,16 +589,16 @@ gcc:buster:amd64:
 system:gcc:buster:amd64:
   <<: *debian_buster_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:buster:amd64
-  needs: ["gcc:buster:amd64"]
+  needs:
+    - job: gcc:buster:amd64
+      artifacts: true
 
 unit:gcc:buster:amd64:
   <<: *debian_buster_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:buster:amd64
-  needs: ["gcc:buster:amd64"]
+  needs:
+    - job: gcc:buster:amd64
+      artifacts: true
 
 # Jobs for scan-build builds on Debian Buster (amd64)
 
@@ -624,10 +622,9 @@ scan-build:buster:amd64:
   script:
     - *configure
     - *scan_build
-  dependencies:
-    - autoreconf:sid:amd64
   needs:
-    - autoreconf:sid:amd64
+    - job: autoreconf:sid:amd64
+      artifacts: true
   artifacts:
     paths:
       - scan-build.reports/
@@ -649,23 +646,23 @@ gcc:sid:amd64:
 system:gcc:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:sid:amd64
-  needs: ["gcc:sid:amd64"]
+  needs:
+    - job: gcc:sid:amd64
+      artifacts: true
 
 unit:gcc:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:sid:amd64
-  needs: ["gcc:sid:amd64"]
+  needs:
+    - job: gcc:sid:amd64
+      artifacts: true
 
 cppcheck:gcc:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *cppcheck_job
-  dependencies:
-    - gcc:sid:amd64
-  needs: ["gcc:sid:amd64"]
+  needs:
+    - job: gcc:sid:amd64
+      artifacts: true
 
 # Job for out-of-tree GCC build on Debian Sid (amd64)
 
@@ -693,9 +690,9 @@ tarball:sid:amd64:
     - tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
     - rm -f bind-*.tar.${TARBALL_EXTENSION}
     - cd bind-*
-  dependencies:
-    - tarball-create:sid:amd64
-  needs: ["tarball-create:sid:amd64"]
+  needs:
+    - job: tarball-create:sid:amd64
+      artifacts: true
   only:
     - tags
 
@@ -705,9 +702,9 @@ system:tarball:sid:amd64:
   before_script:
     - cd bind-*
     - *setup_interfaces
-  dependencies:
-    - tarball:sid:amd64
-  needs: ["tarball:sid:amd64"]
+  needs:
+    - job: tarball:sid:amd64
+      artifacts: true
   only:
     - tags
 
@@ -716,9 +713,9 @@ unit:tarball:sid:amd64:
   <<: *unit_test_job
   before_script:
     - cd bind-*
-  dependencies:
-    - tarball:sid:amd64
-  needs: ["tarball:sid:amd64"]
+  needs:
+    - job: tarball:sid:amd64
+      artifacts: true
   only:
     - tags
 
@@ -735,16 +732,16 @@ gcc:sid:i386:
 system:gcc:sid:i386:
   <<: *debian_sid_i386_image
   <<: *system_test_job
-  dependencies:
-    - gcc:sid:i386
-  needs: ["gcc:sid:i386"]
+  needs:
+    - job: gcc:sid:i386
+      artifacts: true
 
 unit:gcc:sid:i386:
   <<: *debian_sid_i386_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:sid:i386
-  needs: ["gcc:sid:i386"]
+  needs:
+    - job: gcc:sid:i386
+      artifacts: true
 
 # Jobs for regular GCC builds on openSUSE Tumbleweed (amd64)
 
@@ -759,16 +756,16 @@ gcc:tumbleweed:amd64:
 system:gcc:tumbleweed:amd64:
   <<: *tumbleweed_latest_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:tumbleweed:amd64
-  needs: ["gcc:tumbleweed:amd64"]
+  needs:
+    - job: gcc:tumbleweed:amd64
+      artifacts: true
 
 unit:gcc:tumbleweed:amd64:
   <<: *tumbleweed_latest_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:tumbleweed:amd64
-  needs: ["gcc:tumbleweed:amd64"]
+  needs:
+    - job: gcc:tumbleweed:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on Fedora 31 (amd64)
 
@@ -783,16 +780,16 @@ gcc:fedora31:amd64:
 system:gcc:fedora31:amd64:
   <<: *fedora_31_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:fedora31:amd64
-  needs: ["gcc:fedora31:amd64"]
+  needs:
+    - job: gcc:fedora31:amd64
+      artifacts: true
 
 unit:gcc:fedora31:amd64:
   <<: *fedora_31_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:fedora31:amd64
-  needs: ["gcc:fedora31:amd64"]
+  needs:
+    - job: gcc:fedora31:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
 
@@ -807,16 +804,16 @@ gcc:xenial:amd64:
 system:gcc:xenial:amd64:
   <<: *ubuntu_xenial_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:xenial:amd64
-  needs: ["gcc:xenial:amd64"]
+  needs:
+    - job: gcc:xenial:amd64
+      artifacts: true
 
 unit:gcc:xenial:amd64:
   <<: *ubuntu_xenial_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:xenial:amd64
-  needs: ["gcc:xenial:amd64"]
+  needs:
+    - job: gcc:xenial:amd64
+      artifacts: true
 
 # Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)
 
@@ -831,16 +828,16 @@ gcc:bionic:amd64:
 system:gcc:bionic:amd64:
   <<: *ubuntu_bionic_amd64_image
   <<: *system_test_job
-  dependencies:
-    - gcc:bionic:amd64
-  needs: ["gcc:bionic:amd64"]
+  needs:
+    - job: gcc:bionic:amd64
+      artifacts: true
 
 unit:gcc:bionic:amd64:
   <<: *ubuntu_bionic_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - gcc:bionic:amd64
-  needs: ["gcc:bionic:amd64"]
+  needs:
+    - job: gcc:bionic:amd64
+      artifacts: true
 
 # Jobs for GCC builds with ASAN enabled on Debian Sid (amd64)
 
@@ -858,18 +855,18 @@ system:asan:sid:amd64:
     ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
   <<: *debian_sid_amd64_image
   <<: *system_test_job
-  dependencies:
-    - asan:sid:amd64
-  needs: ["asan:sid:amd64"]
+  needs:
+    - job: asan:sid:amd64
+      artifacts: true
 
 unit:asan:sid:amd64:
   variables:
     ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
   <<: *debian_sid_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - asan:sid:amd64
-  needs: ["asan:sid:amd64"]
+  needs:
+    - job: asan:sid:amd64
+      artifacts: true
 
 # Jobs for Clang builds on Debian Stretch (amd64)
 
@@ -884,9 +881,9 @@ clang:stretch:amd64:
 unit:clang:stretch:amd64:
   <<: *debian_stretch_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - clang:stretch:amd64
-  needs: ["clang:stretch:amd64"]
+  needs:
+    - job: clang:stretch:amd64
+      artifacts: true
 
 # Jobs for Clang builds on Debian Stretch (i386)
 
@@ -911,16 +908,16 @@ pkcs11:sid:amd64:
 system:pkcs11:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *system_test_job
-  dependencies:
-    - pkcs11:sid:amd64
-  needs: ["pkcs11:sid:amd64"]
+  needs:
+    - job: pkcs11:sid:amd64
+      artifacts: true
 
 unit:pkcs11:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - pkcs11:sid:amd64
-  needs: ["pkcs11:sid:amd64"]
+  needs:
+    - job: pkcs11:sid:amd64
+      artifacts: true
 
 # Jobs for Clang builds on FreeBSD 11.3 (amd64)
 
@@ -937,18 +934,18 @@ system:clang:freebsd11.3:amd64:
   variables:
     USER: gitlab-runner
     TEST_PARALLEL_JOBS: 4
-  dependencies:
-    - clang:freebsd11.3:amd64
-  needs: ["clang:freebsd11.3:amd64"]
+  needs:
+    - job: clang:freebsd11.3:amd64
+      artifacts: true
 
 unit:clang:freebsd11.3:amd64:
   <<: *freebsd_amd64
   <<: *unit_test_job
   variables:
     USER: gitlab-runner
-  dependencies:
-    - clang:freebsd11.3:amd64
-  needs: ["clang:freebsd11.3:amd64"]
+  needs:
+    - job: clang:freebsd11.3:amd64
+      artifacts: true
 
 # Jobs for Clang builds on FreeBSD 12.1 (amd64)
 
@@ -966,18 +963,18 @@ system:clang:freebsd12.1:amd64:
   variables:
     USER: gitlab-runner
     TEST_PARALLEL_JOBS: 4
-  dependencies:
-    - clang:freebsd12.1:amd64
-  needs: ["clang:freebsd12.1:amd64"]
+  needs:
+    - job: clang:freebsd12.1:amd64
+      artifacts: true
 
 unit:clang:freebsd12.1:amd64:
   <<: *freebsd_amd64
   <<: *unit_test_job
   variables:
     USER: gitlab-runner
-  dependencies:
-    - clang:freebsd12.1:amd64
-  needs: ["clang:freebsd12.1:amd64"]
+  needs:
+    - job: clang:freebsd12.1:amd64
+      artifacts: true
 
 # Jobs for Clang builds on OpenBSD 6.6 (amd64)
 
@@ -993,9 +990,9 @@ system:clang:openbsd6.6:amd64:
   <<: *system_test_job
   variables:
     USER: gitlab-runner
-  dependencies:
-    - clang:openbsd6.6:amd64
-  needs: ["clang:openbsd6.6:amd64"]
+  needs:
+    - job: clang:openbsd6.6:amd64
+      artifacts: true
   only:
     - schedules
     - web
@@ -1013,16 +1010,15 @@ nolibtool:sid:amd64:
 system:nolibtool:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *system_test_job
-  dependencies:
-    - nolibtool:sid:amd64
-  needs: ["nolibtool:sid:amd64"]
+  needs:
+    - job: nolibtool:sid:amd64
 
 unit:nolibtool:sid:amd64:
   <<: *debian_sid_amd64_image
   <<: *unit_test_job
-  dependencies:
-    - nolibtool:sid:amd64
-  needs: ["nolibtool:sid:amd64"]
+  needs:
+    - job: nolibtool:sid:amd64
+      artifacts: true
 
 # Jobs for Visual Studio 2017 builds on Windows (amd64)
 
@@ -1036,9 +1032,9 @@ system:msvc:windows:amd64:
   <<: *windows_system_test_job
   variables:
     VSCONF: Release
-  dependencies:
-    - msvc:windows:amd64
-  needs: ["msvc:windows:amd64"]
+  needs:
+    - job: msvc:windows:amd64
+      artifacts: true
 
 msvc-debug:windows:amd64:
   <<: *windows_build_job
@@ -1053,9 +1049,9 @@ system:msvc-debug:windows:amd64:
   <<: *windows_system_test_job
   variables:
     VSCONF: Debug
-  dependencies:
-    - msvc-debug:windows:amd64
-  needs: ["msvc-debug:windows:amd64"]
+  needs:
+    - job: msvc-debug:windows:amd64
+      artifacts: true
 
 # Job producing a release tarball
 
@@ -1088,10 +1084,13 @@ release:sid:amd64:
     - popd
     # Create release tarball
     - tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/
-  dependencies:
-    - tarball-create:sid:amd64
-    - msvc:windows:amd64
-    - msvc-debug:windows:amd64
+  needs:
+    - job: tarball-create:sid:amd64
+      artifacts: true
+    - job: msvc:windows:amd64
+      artifacts: true
+    - job: msvc-debug:windows:amd64
+      artifacts: true
   only:
     - tags
   artifacts:
@@ -1138,10 +1137,9 @@ build:coverity:sid:amd64:
     - *coverity_cache_prep
     - *configure
     - *coverity_build
-  dependencies:
-    - autoreconf:sid:amd64
   needs:
-    - autoreconf:sid:amd64
+    - job: autoreconf:sid:amd64
+      artifacts: true
   artifacts:
     paths:
       - curl-response.txt
@@ -1178,9 +1176,9 @@ respdiff:sid:amd64:
     - ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} V=1
     - cd ../bind-qa/bind9/respdiff
     - bash respdiff.sh -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/refbind" "${CI_PROJECT_DIR}"
-  dependencies:
-    - tarball-create:sid:amd64
-  needs: ["tarball-create:sid:amd64"]
+  needs:
+    - job: tarball-create:sid:amd64
+      artifacts: true
   only:
     - tags
   artifacts: