[libvirt PATCH 1/2] gitlab-ci.yaml: Introduce a variable to disable long broken jobs

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

 



Unfortunately GitLab doesn't have a different mechanism on how to mark
jobs as skipped or disabled apart from the 'only'/'except' pragmas.
Use the 'except' pragma for the job templates to skip jobs which define
the DISABLE_JOB variable.

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 .gitlab-ci.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2d5545f0f..aa55b396a1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,6 +31,9 @@ stages:
     - docker push "$TAG"
   after_script:
     - docker logout
+  except:
+    variables:
+      - $DISABLE_JOB
 
 # We build many containers which can be useful to debug problems but are not
 # needed for the pipeline itself to complete: those sometimes fail, and when
@@ -62,6 +65,9 @@ stages:
       then
         rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz;
       fi
+  except:
+    variables:
+      - $DISABLE_JOB
 
 # Jobs that we delegate to Cirrus CI because they require an operating
 # system other than Linux. These jobs will only run if the required
@@ -102,6 +108,9 @@ stages:
     variables:
       - $CIRRUS_GITHUB_REPO
       - $CIRRUS_API_TOKEN
+  except:
+    variables:
+      - $DISABLE_JOB
 
 .cross_build_default_job_template: &cross_build_job_definition
   stage: builds
@@ -116,6 +125,9 @@ stages:
     - meson build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
     - ninja -C build
     - if test "$CROSS" = "i686" ; then ninja -C build test ; fi
+  except:
+    variables:
+      - $DISABLE_JOB
 
 
 # Native container build jobs
-- 
2.29.2




[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