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

Erik Skultety eskultet at redhat.com
Mon Jan 11 13:42:54 UTC 2021


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 at redhat.com>
---
 .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




More information about the libvir-list mailing list