[gnome-build-meta/alatiera/async-image-builds: 1/2] ci: switch from dependencies key to needs




commit 7f21e12d10ea3e7ef6b3de807cb076cd990c6616
Author: Jordan Petridis <jordan centricular com>
Date:   Tue Sep 1 19:19:01 2020 +0300

    ci: switch from dependencies key to needs
    
    Needs is similar to dependency but more flexible,
    since it allows for different stages being able
    to run at the same time.

 .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe606d1d..c83629e2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,7 +30,9 @@ default:
 
 .build-template:
   stage: build
-  dependencies: [track]
+  needs:
+    - job: 'track'
+      optional: true
   interruptible: true
   script:
   - TARGETS=(core.bst flatpak-runtimes.bst flatpak-platform-extensions.bst flatpak/platform-manifest.bst 
flatpak/sdk-manifest.bst)
@@ -57,7 +59,9 @@ default:
 
 .manual-image-template:
   stage: deploy
-  dependencies: [track]
+  needs:
+    - job: 'track'
+      optional: true
   when: manual
   allow_failure: true
   script:
@@ -79,7 +83,9 @@ default:
 .ostree-template:
   extends: .deploy-rules
   stage: deploy
-  dependencies: [track]
+  needs:
+    - job: 'track'
+      optional: true
   script:
   - |
     export FLAT_MANAGER_SERVER=https://flatmgr-ostree.openshift.gnome.org/
@@ -151,7 +157,17 @@ generate-deploy-config:
   extends:
   - .x86_64
   - .deploy-rules
-  dependencies: [track]
+  needs:
+    - job: 'track'
+      optional: true
+    - job: 'build-x86_64'
+      artifacts: false
+    - job: 'build-i386'
+      artifacts: false
+    - job: 'build-aarch64'
+      artifacts: false
+    - job: 'build-ppc64le'
+      artifacts: false
   stage: deploy-config
   script:
   - test -f track-job.id && TRACK_JOB_ID=$(cat track-job.id)
@@ -254,7 +270,11 @@ iso-installer-x86_64:
 s3-image:
   extends: .x86_64
   stage: deploy
-  dependencies: [track]
+  needs:
+    - job: 'track'
+      optional: true
+    - job: 'build-x86_64'
+      artifacts: false
   script:
   - ${BST_NO_PUSH} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build vm/image.bst iso/image.bst
   - ${BST} -o arch "${ARCH}" checkout --hardlinks vm/image.bst image
@@ -309,7 +329,10 @@ ostree-x86_64:
 cve_report:
   extends: .x86_64
   stage: reports
-  dependencies: [track]
+  needs:
+    - job: 'track'
+    - job: 'vm-image-x86_64'
+      artifacts: false
   script:
   - ${BST} pull flatpak/platform-manifest.bst flatpak/sdk-manifest.bst
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]