[libvirt] [jenkins-ci PATCH 3/3] jobs: Drop autotools-mingw-job

Andrea Bolognani abologna at redhat.com
Tue Apr 17 15:43:12 UTC 2018


Now that we have variants and we've removed all uses of custom
environment variables, we can convert all jobs that use the
autotools-mingw-job template to the autotools-build-job plus
a few overrides.

As a consequence of this, mingw32 and mingw64 builds will be
split into separate jobs.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 jobs/autotools.yaml        | 80 ----------------------------------------------
 jobs/defaults.yaml         | 16 ++++++++++
 projects/libvirt-glib.yaml | 12 ++++++-
 projects/libvirt.yaml      | 12 ++++++-
 projects/virt-viewer.yaml  | 12 ++++++-
 5 files changed, 49 insertions(+), 83 deletions(-)

diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml
index ac7099f..9868573 100644
--- a/jobs/autotools.yaml
+++ b/jobs/autotools.yaml
@@ -179,83 +179,3 @@
           recipients: '{obj:spam}'
           notify-every-unstable-build: true
           send-to-individuals: false
-
-- job-template:
-    id: autotools-mingw-job
-    name: '{name}-{branch}-mingw{variant}'
-    project-type: matrix
-    description: '{title} MinGW'
-    autogen_args: ''
-    workspace: '{name}-{branch}-mingw{variant}'
-    child-workspace: '.'
-    block-downstream: true
-    block-upstream: true
-    wrappers:
-      - timeout:
-          abort: true
-          type: absolute
-          timeout: 90
-          write-description: 'Aborted build after 90 minutes'
-    properties:
-      - build-discarder:
-          days-to-keep: 30
-          num-to-keep: 1000
-    scm:
-      - git:
-          url: git://n64.pufty.ci.centos.org/{name}.git
-          branches:
-            - origin/{branch}
-          clean:
-            after: true
-          skip-tag: true
-          wipe-workspace: false
-    triggers:
-      - reverse:
-          jobs: '{obj:parent_jobs}'
-      - pollscm:
-          cron: "H/20 * * * *"
-    axes:
-      - axis:
-          name: systems
-          type: slave
-          values: '{obj:machines}'
-    builders:
-      - shell: |
-          {global_env}
-          {local_env}
-          # The MinGW build needs to use the MinGW compiler toolchain,
-          # while $CC is pointing to the native toolchain, so we have
-          # to unset it here.
-          export CC=
-
-          export VIRT_PREFIX="$VIRT_PREFIX/i686-w64-mingw32/sys-root/mingw"
-          export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
-          export PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig"
-
-          mkdir -p build32
-          cd build32
-
-          ../autogen.sh --prefix=$VIRT_PREFIX --host=i686-w64-mingw32
-          $MAKE -j{smp}
-          $MAKE -j{smp} install
-      - shell: |
-          {global_env}
-          {local_env}
-          # See above
-          export CC=
-
-          export VIRT_PREFIX="$VIRT_PREFIX/x86_64-w64-mingw32/sys-root/mingw"
-          export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
-          export PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig"
-
-          mkdir -p build64
-          cd build64
-
-          ../autogen.sh --prefix=$VIRT_PREFIX --host=x86_64-w64-mingw32
-          $MAKE -j{smp}
-          $MAKE -j{smp} install
-    publishers:
-      - email:
-          recipients: '{obj:spam}'
-          notify-every-unstable-build: true
-          send-to-individuals: false
diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
index eef92e8..5527546 100644
--- a/jobs/defaults.yaml
+++ b/jobs/defaults.yaml
@@ -6,5 +6,21 @@
     node: libvirt
     global_env: |
     local_env: |
+    mingw32_local_env: |
+      # The MinGW build needs to use the MinGW compiler toolchain,
+      # while $CC is pointing to the native toolchain, so we have
+      # to unset it here.
+      export CC=
+      export VIRT_PREFIX="$VIRT_PREFIX/i686-w64-mingw32/sys-root/mingw"
+      export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
+      export PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig"
+    mingw32_autogen_args: --host=i686-w64-mingw32
+    mingw64_local_env: |
+      # See above
+      export CC=
+      export VIRT_PREFIX="$VIRT_PREFIX/x86_64-w64-mingw32/sys-root/mingw"
+      export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
+      export PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig"
+    mingw64_autogen_args: --host=x86_64-w64-mingw32
     smp: 3
     spam: ymankad at redhat.com libvirt-ci at redhat.com
diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml
index 3873c40..c56e5d3 100644
--- a/projects/libvirt-glib.yaml
+++ b/projects/libvirt-glib.yaml
@@ -26,7 +26,17 @@
             - libvirt-fedora-26
             - libvirt-fedora-27
             - libvirt-fedora-rawhide
-      - autotools-mingw-job:
+      - autotools-build-job:
+          parent_jobs:
+          variant: -mingw32
+          local_env: '{mingw32_local_env}'
+          autogen_args: '{mingw32_autogen_args}'
+          machines:
+            - libvirt-fedora-rawhide
+      - autotools-build-job:
           parent_jobs:
+          variant: -mingw64
+          local_env: '{mingw64_local_env}'
+          autogen_args: '{mingw64_autogen_args}'
           machines:
             - libvirt-fedora-rawhide
diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml
index 13f39f9..bff9ad9 100644
--- a/projects/libvirt.yaml
+++ b/projects/libvirt.yaml
@@ -39,7 +39,17 @@
             - libvirt-fedora-26
             - libvirt-fedora-27
             - libvirt-fedora-rawhide
-      - autotools-mingw-job:
+      - autotools-build-job:
+          parent_jobs:
+          variant: -mingw32
+          local_env: '{mingw32_local_env}'
+          autogen_args: '{mingw32_autogen_args}'
+          machines:
+            - libvirt-fedora-rawhide
+      - autotools-build-job:
           parent_jobs:
+          variant: -mingw64
+          local_env: '{mingw64_local_env}'
+          autogen_args: '{mingw64_autogen_args}'
           machines:
             - libvirt-fedora-rawhide
diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml
index 2d8a6f9..5a882bc 100644
--- a/projects/virt-viewer.yaml
+++ b/projects/virt-viewer.yaml
@@ -25,7 +25,17 @@
             - libvirt-fedora-26
             - libvirt-fedora-27
             - libvirt-fedora-rawhide
-      - autotools-mingw-job:
+      - autotools-build-job:
+          parent_jobs:
+          variant: -mingw32
+          local_env: '{mingw32_local_env}'
+          autogen_args: '{mingw32_autogen_args}'
+          machines:
+            - libvirt-fedora-rawhide
+      - autotools-build-job:
           parent_jobs:
+          variant: -mingw64
+          local_env: '{mingw64_local_env}'
+          autogen_args: '{mingw64_autogen_args}'
           machines:
             - libvirt-fedora-rawhide
-- 
2.14.3




More information about the libvir-list mailing list