gitlab-ci: Do not download artifacts of unrelated builds
authorAndrew Bartlett <abartlet@samba.org>
Thu, 14 Oct 2021 19:22:17 +0000 (08:22 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 15 Oct 2021 09:09:36 +0000 (09:09 +0000)
This needs: is overridden in many cases, but ensures none of the other
main jobs start until this build finishes.  However this also
ensures we do not download artifacts from any build unless we
specifically depend on it, saving bandwidth

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14863

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
.gitlab-ci-main.yml

index 6cf2a2de3398de9ce68288c4642c799794c04f53..f807eef41ce4b7fa70c105f874ae410f0a821398 100644 (file)
@@ -97,6 +97,16 @@ include:
     key: ccache.${CI_JOB_NAME}.${SAMBA_CI_JOB_IMAGE}.${SAMBA_CI_FLAVOR}
     paths:
       - ccache
+
+  # This is overridden in many cases, but ensures none of the other
+  # main jobs start until and unless this build finishes.  However
+  # this also ensures we do not download artifacts from any build
+  # unless we specifically depend on it, saving bandwidth
+
+  needs:
+    - job: samba-def-build
+      artifacts: false
+
   before_script:
     - uname -a
     - lsb_release -a
@@ -176,6 +186,7 @@ others:
 .shared_template_build_only:
   extends: .shared_template
   timeout: 2h
+  needs:
   artifacts:
     expire_in: 1 week
     paths: