These tasks mirror the Jenkins jobs contained in the
top-level jobs/ directory.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
.../build/jobs/autotools-build-job.yml | 15 +++++++
.../build/jobs/autotools-check-job.yml | 16 ++++++++
.../build/jobs/autotools-rpm-job.yml | 15 +++++++
.../build/jobs/autotools-syntax-check-job.yml | 12 ++++++
guests/playbooks/build/jobs/defaults.yml | 39 +++++++++++++++++++
.../build/jobs/generic-build-job.yml | 11 ++++++
.../build/jobs/generic-check-job.yml | 11 ++++++
.../playbooks/build/jobs/generic-rpm-job.yml | 11 ++++++
.../build/jobs/generic-syntax-check-job.yml | 11 ++++++
guests/playbooks/build/jobs/go-build-job.yml | 11 ++++++
guests/playbooks/build/jobs/go-check-job.yml | 11 ++++++
.../build/jobs/perl-modulebuild-build-job.yml | 13 +++++++
.../build/jobs/perl-modulebuild-check-job.yml | 11 ++++++
.../build/jobs/perl-modulebuild-rpm-job.yml | 14 +++++++
guests/playbooks/build/jobs/prepare.yml | 19 +++++++++
.../build/jobs/python-distutils-build-job.yml | 13 +++++++
.../build/jobs/python-distutils-check-job.yml | 11 ++++++
.../build/jobs/python-distutils-rpm-job.yml | 14 +++++++
18 files changed, 258 insertions(+)
create mode 100644 guests/playbooks/build/jobs/autotools-build-job.yml
create mode 100644 guests/playbooks/build/jobs/autotools-check-job.yml
create mode 100644 guests/playbooks/build/jobs/autotools-rpm-job.yml
create mode 100644 guests/playbooks/build/jobs/autotools-syntax-check-job.yml
create mode 100644 guests/playbooks/build/jobs/defaults.yml
create mode 100644 guests/playbooks/build/jobs/generic-build-job.yml
create mode 100644 guests/playbooks/build/jobs/generic-check-job.yml
create mode 100644 guests/playbooks/build/jobs/generic-rpm-job.yml
create mode 100644 guests/playbooks/build/jobs/generic-syntax-check-job.yml
create mode 100644 guests/playbooks/build/jobs/go-build-job.yml
create mode 100644 guests/playbooks/build/jobs/go-check-job.yml
create mode 100644 guests/playbooks/build/jobs/perl-modulebuild-build-job.yml
create mode 100644 guests/playbooks/build/jobs/perl-modulebuild-check-job.yml
create mode 100644 guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml
create mode 100644 guests/playbooks/build/jobs/prepare.yml
create mode 100644 guests/playbooks/build/jobs/python-distutils-build-job.yml
create mode 100644 guests/playbooks/build/jobs/python-distutils-check-job.yml
create mode 100644 guests/playbooks/build/jobs/python-distutils-rpm-job.yml
diff --git a/guests/playbooks/build/jobs/autotools-build-job.yml
b/guests/playbooks/build/jobs/autotools-build-job.yml
new file mode 100644
index 0000000..bb621a1
--- /dev/null
+++ b/guests/playbooks/build/jobs/autotools-build-job.yml
@@ -0,0 +1,15 @@
+---
+- name: '{{ name }}-{{ branch }}-build{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ mkdir build
+ cd build
+ ../autogen.sh --prefix=$VIRT_PREFIX {{ autogen_args }}
+ $MAKE
+ $MAKE install
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/autotools-check-job.yml
b/guests/playbooks/build/jobs/autotools-check-job.yml
new file mode 100644
index 0000000..50024ae
--- /dev/null
+++ b/guests/playbooks/build/jobs/autotools-check-job.yml
@@ -0,0 +1,16 @@
+---
+- name: '{{ name }}-{{ branch }}-check{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ cd build
+ if ! $MAKE check
+ then
+ cat tests/test-suite.log || true
+ exit 1
+ fi
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/autotools-rpm-job.yml
b/guests/playbooks/build/jobs/autotools-rpm-job.yml
new file mode 100644
index 0000000..c8babdf
--- /dev/null
+++ b/guests/playbooks/build/jobs/autotools-rpm-job.yml
@@ -0,0 +1,15 @@
+---
+- name: '{{ name }}-{{ branch }}-rpm{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ cd build
+ {{ strip_buildrequires }}
+ rm -f *.tar.{{ archive_format }}
+ $MAKE dist
+ rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta *.tar.{{
archive_format }}
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/autotools-syntax-check-job.yml
b/guests/playbooks/build/jobs/autotools-syntax-check-job.yml
new file mode 100644
index 0000000..bbbd240
--- /dev/null
+++ b/guests/playbooks/build/jobs/autotools-syntax-check-job.yml
@@ -0,0 +1,12 @@
+---
+- name: '{{ name }}-{{ branch }}-syntax-check{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ cd build
+ $MAKE syntax-check
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/defaults.yml
b/guests/playbooks/build/jobs/defaults.yml
new file mode 100644
index 0000000..ce49f5a
--- /dev/null
+++ b/guests/playbooks/build/jobs/defaults.yml
@@ -0,0 +1,39 @@
+---
+branch: master
+variant: ''
+all_machines:
+ - libvirt-centos-7
+ - libvirt-debian-8
+ - libvirt-debian-9
+ - libvirt-fedora-27
+ - libvirt-fedora-28
+ - libvirt-fedora-rawhide
+ - libvirt-freebsd-10
+ - libvirt-freebsd-11
+rpm_machines:
+ - libvirt-centos-7
+ - libvirt-fedora-27
+ - libvirt-fedora-28
+ - libvirt-fedora-rawhide
+mingw_machines:
+ - libvirt-fedora-rawhide
+global_env: ''
+local_env: ''
+autogen_args: ''
+command: ''
+command_pre_build: ''
+strip_buildrequires: |
+ sed -i -e 's/BuildRequires: *libvirt.*//' *.spec*
+ sed -i -e 's/BuildRequires: *osinfo-db.*//' *.spec*
+ sed -i -e 's/BuildRequires: *perl(Sys::Virt).*//' *.spec*
+ sed -i -e 's/BuildRequires: *pkgconfig(libvirt.*).*//' *.spec*
+mingw32_local_env: |
+ 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: |
+ 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
diff --git a/guests/playbooks/build/jobs/generic-build-job.yml
b/guests/playbooks/build/jobs/generic-build-job.yml
new file mode 100644
index 0000000..5519eee
--- /dev/null
+++ b/guests/playbooks/build/jobs/generic-build-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-build{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ {{ command }}
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/generic-check-job.yml
b/guests/playbooks/build/jobs/generic-check-job.yml
new file mode 100644
index 0000000..00fbce3
--- /dev/null
+++ b/guests/playbooks/build/jobs/generic-check-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-check{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ {{ command }}
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/generic-rpm-job.yml
b/guests/playbooks/build/jobs/generic-rpm-job.yml
new file mode 100644
index 0000000..1db4ea4
--- /dev/null
+++ b/guests/playbooks/build/jobs/generic-rpm-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-rpm{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ {{ command }}
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/generic-syntax-check-job.yml
b/guests/playbooks/build/jobs/generic-syntax-check-job.yml
new file mode 100644
index 0000000..72885f1
--- /dev/null
+++ b/guests/playbooks/build/jobs/generic-syntax-check-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-syntax-check{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ {{ command }}
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/go-build-job.yml
b/guests/playbooks/build/jobs/go-build-job.yml
new file mode 100644
index 0000000..8a3ebb9
--- /dev/null
+++ b/guests/playbooks/build/jobs/go-build-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-build{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ go build -v
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/go-check-job.yml
b/guests/playbooks/build/jobs/go-check-job.yml
new file mode 100644
index 0000000..dda7998
--- /dev/null
+++ b/guests/playbooks/build/jobs/go-check-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-check{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ go test $TEST_ARGS
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/perl-modulebuild-build-job.yml
b/guests/playbooks/build/jobs/perl-modulebuild-build-job.yml
new file mode 100644
index 0000000..030e713
--- /dev/null
+++ b/guests/playbooks/build/jobs/perl-modulebuild-build-job.yml
@@ -0,0 +1,13 @@
+---
+- name: '{{ name }}-{{ branch }}-build{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ perl Build.PL install_base="$VIRT_PREFIX"
+ perl Build
+ perl Build install
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/perl-modulebuild-check-job.yml
b/guests/playbooks/build/jobs/perl-modulebuild-check-job.yml
new file mode 100644
index 0000000..165e868
--- /dev/null
+++ b/guests/playbooks/build/jobs/perl-modulebuild-check-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-check{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ perl Build test
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml
b/guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml
new file mode 100644
index 0000000..7a2ddc9
--- /dev/null
+++ b/guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml
@@ -0,0 +1,14 @@
+---
+- name: '{{ name }}-{{ branch }}-rpm{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ {{ strip_buildrequires }}
+ rm -f *.tar.{{ archive_format }}
+ perl Build dist
+ rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta *.tar.{{
archive_format }}
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/prepare.yml
b/guests/playbooks/build/jobs/prepare.yml
new file mode 100644
index 0000000..0b22ac5
--- /dev/null
+++ b/guests/playbooks/build/jobs/prepare.yml
@@ -0,0 +1,19 @@
+---
+- name: '{{ name }}-{{ branch }}-prepare{{ variant }}'
+ git:
+ repo: '{{ git_url }}'
+ version: '{{ branch }}'
+ dest: '{{ name }}-{{ branch }}{{ variant }}'
+ force: yes
+ when:
+ - inventory_hostname in machines
+
+- name: '{{ name }}-{{ branch }}-prepare{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ git clean -xdf
+ git submodule update --init
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/python-distutils-build-job.yml
b/guests/playbooks/build/jobs/python-distutils-build-job.yml
new file mode 100644
index 0000000..c077015
--- /dev/null
+++ b/guests/playbooks/build/jobs/python-distutils-build-job.yml
@@ -0,0 +1,13 @@
+---
+- name: '{{ name }}-{{ branch }}-build{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ {{ command_pre_build }}
+ $PYTHON ./setup.py build
+ $PYTHON ./setup.py install --prefix=$VIRT_PREFIX
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/python-distutils-check-job.yml
b/guests/playbooks/build/jobs/python-distutils-check-job.yml
new file mode 100644
index 0000000..318feaf
--- /dev/null
+++ b/guests/playbooks/build/jobs/python-distutils-check-job.yml
@@ -0,0 +1,11 @@
+---
+- name: '{{ name }}-{{ branch }}-check{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ $PYTHON ./setup.py test
+ when:
+ - inventory_hostname in machines
diff --git a/guests/playbooks/build/jobs/python-distutils-rpm-job.yml
b/guests/playbooks/build/jobs/python-distutils-rpm-job.yml
new file mode 100644
index 0000000..4ee418f
--- /dev/null
+++ b/guests/playbooks/build/jobs/python-distutils-rpm-job.yml
@@ -0,0 +1,14 @@
+---
+- name: '{{ name }}-{{ branch }}-rpm{{ variant }}'
+ shell: |
+ set -e
+ cd {{ name }}-{{ branch }}{{ variant }}
+
+ {{ global_env }}
+ {{ local_env }}
+ {{ strip_buildrequires }}
+ rm -f dist/*.tar.{{ archive_format }}
+ $PYTHON ./setup.py sdist
+ rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta dist/*.tar.{{
archive_format }}
+ when:
+ - inventory_hostname in machines
--
2.17.1