[PATCH 2/4] travis: Don't duplicate Docker invocation

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

 



All variable parts are taken from the environment, so we
can exploit inheritance and avoid duplication. This will
become more important as we start building on additional
platforms.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 .travis.yml | 31 +++++++++++--------------------
 1 file changed, 11 insertions(+), 20 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f99e1cd6e6..4afaca313b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,31 +12,11 @@ matrix:
       env:
         - IMAGE=ubuntu:18.04
         - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=systemd"
-      script:
-        - docker run
-            --privileged
-            -v $(pwd):/build
-            -w /build
-            -e VIR_TEST_DEBUG="$VIR_TEST_DEBUG"
-            -e PACKAGES="$PACKAGES"
-            -e DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS"
-            "$IMAGE"
-            /bin/sh -xc "$DOCKER_CMD"
     - services:
         - docker
       env:
         - IMAGE=ubuntu:16.04
         - DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart"
-      script:
-        - docker run
-            --privileged
-            -v $(pwd):/build
-            -w /build
-            -e VIR_TEST_DEBUG="$VIR_TEST_DEBUG"
-            -e PACKAGES="$PACKAGES"
-            -e DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS"
-            "$IMAGE"
-            /bin/sh -xc "$DOCKER_CMD"
     - compiler: clang
       language: c
       os: osx
@@ -57,6 +37,17 @@ matrix:
         - find -name test-suite.log | xargs cat
         - echo '=== LOG FILE(S) END ==='
 
+script:
+  - docker run
+      --privileged
+      -v $(pwd):/build
+      -w /build
+      -e VIR_TEST_DEBUG="$VIR_TEST_DEBUG"
+      -e PACKAGES="$PACKAGES"
+      -e DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS"
+      "$IMAGE"
+      /bin/sh -xc "$DOCKER_CMD"
+
 git:
   submodules: true
 
-- 
2.17.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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