[jenkins-ci PATCH v3 1/3] jobs: Introduce machine groups

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

 



We're running most of the jobs on all machines, with the major
notable exceptions being the various *-rpm jobs, which of course
only make sense for RPM-based distributions, and the MinGW jobs,
which we only run on Fedora Rawhide.

Instead of listing machines over and over again, define two
list globally and refer to them by name. Ad-hoc machine lists
are still needed in a few places, but overall this cuts down on
repetition significantly.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 jobs/defaults.yaml            | 16 ++++++++++++++++
 projects/libosinfo.yaml       | 16 ++--------------
 projects/libvirt-cim.yaml     |  6 +-----
 projects/libvirt-dbus.yaml    |  6 +-----
 projects/libvirt-glib.yaml    | 22 ++++------------------
 projects/libvirt-go-xml.yaml  | 10 +---------
 projects/libvirt-go.yaml      | 10 +---------
 projects/libvirt-perl.yaml    | 16 ++--------------
 projects/libvirt-python.yaml  | 16 ++--------------
 projects/libvirt.yaml         | 33 +++++++++++++--------------------
 projects/osinfo-db-tools.yaml | 16 ++--------------
 projects/osinfo-db.yaml       | 16 ++--------------
 projects/virt-viewer.yaml     | 22 ++++------------------
 13 files changed, 51 insertions(+), 154 deletions(-)

diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
index 5527546..99e8b62 100644
--- a/jobs/defaults.yaml
+++ b/jobs/defaults.yaml
@@ -4,6 +4,22 @@
     branch: master
     variant: ''
     node: libvirt
+    all_machines:
+      - libvirt-centos-7
+      - libvirt-debian-8
+      - libvirt-debian-9
+      - libvirt-fedora-26
+      - libvirt-fedora-27
+      - libvirt-fedora-rawhide
+      - libvirt-freebsd-10
+      - libvirt-freebsd-11
+    rpm_machines:
+      - libvirt-centos-7
+      - libvirt-fedora-26
+      - libvirt-fedora-27
+      - libvirt-fedora-rawhide
+    mingw_machines:
+      - libvirt-fedora-rawhide
     global_env: |
     local_env: |
     mingw32_local_env: |
diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml
index ac04027..0d25447 100644
--- a/projects/libosinfo.yaml
+++ b/projects/libosinfo.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: libosinfo
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: libosinfo
     jobs:
       - autotools-build-job:
@@ -20,8 +12,4 @@
           parent_jobs: 'libosinfo-master-syntax-check'
       - autotools-rpm-job:
           parent_jobs: 'libosinfo-master-check'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
diff --git a/projects/libvirt-cim.yaml b/projects/libvirt-cim.yaml
index 160faaf..dff3976 100644
--- a/projects/libvirt-cim.yaml
+++ b/projects/libvirt-cim.yaml
@@ -1,11 +1,7 @@
 
 - project:
     name: libvirt-cim
-    machines:
-      - libvirt-centos-7
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
+    machines: '{rpm_machines}'
     title: libvirt CIM
     jobs:
       - autotools-build-job:
diff --git a/projects/libvirt-dbus.yaml b/projects/libvirt-dbus.yaml
index 7e761c7..52cd60c 100644
--- a/projects/libvirt-dbus.yaml
+++ b/projects/libvirt-dbus.yaml
@@ -24,8 +24,4 @@
             - libvirt-freebsd-11
       - autotools-rpm-job:
           parent_jobs: 'libvirt-dbus-master-check'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml
index c56e5d3..2d0e721 100644
--- a/projects/libvirt-glib.yaml
+++ b/projects/libvirt-glib.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: libvirt-glib
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: Libvirt GLib
     jobs:
       - autotools-build-job:
@@ -21,22 +13,16 @@
           parent_jobs: 'libvirt-glib-master-syntax-check'
       - autotools-rpm-job:
           parent_jobs: 'libvirt-glib-master-check'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
       - autotools-build-job:
           parent_jobs:
           variant: -mingw32
           local_env: '{mingw32_local_env}'
           autogen_args: '{mingw32_autogen_args}'
-          machines:
-            - libvirt-fedora-rawhide
+          machines: '{mingw_machines}'
       - autotools-build-job:
           parent_jobs:
           variant: -mingw64
           local_env: '{mingw64_local_env}'
           autogen_args: '{mingw64_autogen_args}'
-          machines:
-            - libvirt-fedora-rawhide
+          machines: '{mingw_machines}'
diff --git a/projects/libvirt-go-xml.yaml b/projects/libvirt-go-xml.yaml
index 126058b..1f26751 100644
--- a/projects/libvirt-go-xml.yaml
+++ b/projects/libvirt-go-xml.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: libvirt-go-xml
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: Libvirt Go XML
     local_env: |
       export TEST_ARGS="-tags xmlroundtrip"
diff --git a/projects/libvirt-go.yaml b/projects/libvirt-go.yaml
index 141c862..f40f523 100644
--- a/projects/libvirt-go.yaml
+++ b/projects/libvirt-go.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: libvirt-go
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: Libvirt Go
     local_env: |
       export TEST_ARGS="-tags api"
diff --git a/projects/libvirt-perl.yaml b/projects/libvirt-perl.yaml
index eb1ee77..0a6f648 100644
--- a/projects/libvirt-perl.yaml
+++ b/projects/libvirt-perl.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: libvirt-perl
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: Libvirt Perl
     jobs:
       - perl-makemaker-build-job:
@@ -19,8 +11,4 @@
           test_args: 'TEST_MAINTAINER=1'
       - perl-makemaker-rpm-job:
           parent_jobs: 'libvirt-perl-master-test'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml
index 26accf4..1e742da 100644
--- a/projects/libvirt-python.yaml
+++ b/projects/libvirt-python.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: libvirt-python
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: Libvirt Python
     jobs:
       - python-distutils-build-job:
@@ -18,8 +10,4 @@
           parent_jobs: 'libvirt-python-master-build'
       - python-distutils-rpm-job:
           parent_jobs: 'libvirt-python-master-check'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml
index 6426a95..56b82e9 100644
--- a/projects/libvirt.yaml
+++ b/projects/libvirt.yaml
@@ -1,18 +1,14 @@
 
 - project:
     name: libvirt
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
+    machines: '{all_machines}'
     title: Libvirt
     archive_format: xz
     jobs:
       - autotools-build-job:
           parent_jobs:
+      - autotools-syntax-check-job:
+          parent_jobs: 'libvirt-master-build'
           machines:
             - libvirt-centos-7
             - libvirt-debian-8
@@ -20,33 +16,30 @@
             - libvirt-fedora-26
             - libvirt-fedora-27
             - libvirt-fedora-rawhide
-            - libvirt-freebsd-10
-            - libvirt-freebsd-11
-      - autotools-syntax-check-job:
-          parent_jobs: 'libvirt-master-build'
       - autotools-check-job:
           parent_jobs: 'libvirt-master-syntax-check'
-          local_env: |
-            export VIR_TEST_EXPENSIVE=1
-            export VIR_TEST_DEBUG=2
-      - autotools-rpm-job:
-          parent_jobs: 'libvirt-master-check'
           machines:
             - libvirt-centos-7
+            - libvirt-debian-8
+            - libvirt-debian-9
             - libvirt-fedora-26
             - libvirt-fedora-27
             - libvirt-fedora-rawhide
+          local_env: |
+            export VIR_TEST_EXPENSIVE=1
+            export VIR_TEST_DEBUG=2
+      - autotools-rpm-job:
+          parent_jobs: 'libvirt-master-check'
+          machines: '{rpm_machines}'
       - autotools-build-job:
           parent_jobs:
           variant: -mingw32
           local_env: '{mingw32_local_env}'
           autogen_args: '{mingw32_autogen_args}'
-          machines:
-            - libvirt-fedora-rawhide
+          machines: '{mingw_machines}'
       - autotools-build-job:
           parent_jobs:
           variant: -mingw64
           local_env: '{mingw64_local_env}'
           autogen_args: '{mingw64_autogen_args}'
-          machines:
-            - libvirt-fedora-rawhide
+          machines: '{mingw_machines}'
diff --git a/projects/osinfo-db-tools.yaml b/projects/osinfo-db-tools.yaml
index e51a064..6b451ef 100644
--- a/projects/osinfo-db-tools.yaml
+++ b/projects/osinfo-db-tools.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: osinfo-db-tools
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: osinfo database tools
     jobs:
       - autotools-build-job:
@@ -20,8 +12,4 @@
           parent_jobs: 'osinfo-db-tools-master-syntax-check'
       - autotools-rpm-job:
           parent_jobs: 'osinfo-db-tools-master-check'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml
index 7f83722..0d0a972 100644
--- a/projects/osinfo-db.yaml
+++ b/projects/osinfo-db.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: osinfo-db
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: osinfo database
     jobs:
       - generic-build-job:
@@ -23,11 +15,7 @@
             $MAKE -j{smp} check
       - generic-rpm-job:
           parent_jobs: 'osinfo-db-master-check'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
           command: |
             rm -f *.tar.xz
             $MAKE osinfo-db.spec
diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml
index 5a882bc..3726cd0 100644
--- a/projects/virt-viewer.yaml
+++ b/projects/virt-viewer.yaml
@@ -1,15 +1,7 @@
 
 - project:
     name: virt-viewer
-    machines:
-      - libvirt-centos-7
-      - libvirt-debian-8
-      - libvirt-debian-9
-      - libvirt-fedora-26
-      - libvirt-fedora-27
-      - libvirt-fedora-rawhide
-      - libvirt-freebsd-10
-      - libvirt-freebsd-11
+    machines: '{all_machines}'
     title: Virt Viewer
     jobs:
       - autotools-build-job:
@@ -20,22 +12,16 @@
           parent_jobs: 'virt-viewer-master-syntax-check'
       - autotools-rpm-job:
           parent_jobs: 'virt-viewer-master-check'
-          machines:
-            - libvirt-centos-7
-            - libvirt-fedora-26
-            - libvirt-fedora-27
-            - libvirt-fedora-rawhide
+          machines: '{rpm_machines}'
       - autotools-build-job:
           parent_jobs:
           variant: -mingw32
           local_env: '{mingw32_local_env}'
           autogen_args: '{mingw32_autogen_args}'
-          machines:
-            - libvirt-fedora-rawhide
+          machines: '{mingw_machines}'
       - autotools-build-job:
           parent_jobs:
           variant: -mingw64
           local_env: '{mingw64_local_env}'
           autogen_args: '{mingw64_autogen_args}'
-          machines:
-            - libvirt-fedora-rawhide
+          machines: '{mingw_machines}'
-- 
2.14.3

--
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