[libvirt PATCH 2/3] ci: Allow skipping dist

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

 



Instead of having an ad-hoc build script for CentOS 7, follow the
pattern established in other repositories under the libvirt group
and allow selectively disabling that specific part of the build.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 .gitlab-ci.yml | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ee404bf50a..dda199761a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,24 +51,13 @@ stages:
     - *script_variables
   script:
     - meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
-    - ninja -C build dist
-
-# Default native build job only for CentOS 7 that is always run
-# meson dist fails on CentOS 7 because of old git that fails to clone
-# from shallow git repository which is done when running meson dist
-.native_build_centos_7_job_template: &native_build_centos_7_job_definition
-  stage: builds
-  image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
-  cache:
-    paths:
-      - ccache/
-    key: "$CI_JOB_NAME"
-  before_script:
-    - *script_variables
-  script:
-    - meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
-    - ninja -C build
-    - ninja -C build test
+    - if test "$DIST" != "skip";
+      then
+        ninja -C build dist;
+      else
+        ninja -C build;
+        ninja -C build test;
+      fi
 
 # Jobs that we delegate to Cirrus CI because they require an operating
 # system other than Linux. These jobs will only run if the required
@@ -305,11 +294,14 @@ x64-debian-sid:
     NAME: debian-sid
 
 x64-centos-7:
-  <<: *native_build_centos_7_job_definition
+  <<: *native_build_job_definition
   needs:
     - x64-centos-7-container
   variables:
     NAME: centos-7
+    # meson dist fails on CentOS 7 because of old git that fails to clone
+    # from shallow git repository which is done when running meson dist
+    DIST: skip
 
 x64-centos-8:
   <<: *native_build_job_definition
-- 
2.26.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