[libvirt PATCH 3/5] gitlab: group jobs into stages

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

 



Within a stage all jobs run in parallel. Stages are ordered so later
stages are only executed if previous stages succeeded. By using separate
stages for the cross builds, we can avoid wasting CI resources if the
relatively simple website build fails. Later we can avoid running cross
builds, if the native build fails too.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 .gitlab-ci.yml | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b6a8db7881..e28ec584ea 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,9 @@
-.job_template: &job_definition
+stages:
+  - website
+  - cross_build
+
+.cross_build_job_template: &cross_build_job_definition
+  stage: cross_build
   script:
     - mkdir build
     - cd build
@@ -13,17 +18,18 @@
 # between Debian 10 and sid to help detect problems on the horizon.
 
 debian-10-cross-s390x:
-  <<: *job_definition
+  <<: *cross_build_job_definition
   image: quay.io/libvirt/buildenv-libvirt-debian-10-cross-s390x:latest
 
 debian-sid-cross-armv7l:
-  <<: *job_definition
+  <<: *cross_build_job_definition
   image: quay.io/libvirt/buildenv-libvirt-debian-sid-cross-armv7l:latest
 
 # This artifact published by this job is downloaded by libvirt.org to
 # be deployed to the web root:
 #    https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=website
 website:
+  stage: website
   script:
     - mkdir build
     - cd build
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux