[libvirt] [jenkins-ci PATCH v2 0/4] Expand test matrix, plus cleanups

Changes from [v1]: * don't move project-specific environment variables to the default check_env. [v1] https://www.redhat.com/archives/libvir-list/2017-October/msg01256.html Andrea Bolognani (4): README: Update, expand and convert to Markdown jobs: Move check_env defaults projects: Set $OSINFO_SYSTEM_DIR in check_env projects: Expand test matrix README | 34 ------------------------------ README.markdown | 48 +++++++++++++++++++++++++++++++++++++++++++ jobs/autotools.yaml | 1 - jobs/defaults.yaml | 1 + jobs/go.yaml | 1 - projects/libosinfo.yaml | 11 +++++----- projects/libvirt-glib.yaml | 4 ++++ projects/libvirt-go-xml.yaml | 4 ++++ projects/libvirt-go.yaml | 4 ++++ projects/libvirt-perl.yaml | 5 +++++ projects/libvirt-python.yaml | 4 ++++ projects/libvirt-sandbox.yaml | 2 ++ projects/libvirt-tck.yaml | 4 ++++ projects/libvirt.yaml | 16 +++++++-------- projects/osinfo-db-tools.yaml | 4 ++++ projects/osinfo-db.yaml | 3 +++ projects/virt-manager.yaml | 4 ++++ projects/virt-viewer.yaml | 4 ++++ 18 files changed, 104 insertions(+), 50 deletions(-) delete mode 100644 README create mode 100644 README.markdown -- 2.13.6

The documentation is not very extensive, plus the documented commands don't really work anymore now that the guests/ directory has been added. Move to Markdown while at it, since it's a much nicer format than whatever ad-hoc pseudo-markup we're using now. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- README | 34 ---------------------------------- README.markdown | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 34 deletions(-) delete mode 100644 README create mode 100644 README.markdown diff --git a/README b/README deleted file mode 100644 index 9871cfc..0000000 --- a/README +++ /dev/null @@ -1,34 +0,0 @@ - Libvirt Jenkins CI - ================== - -This package contains the libvirt Jenkins CI configuration tasks. - -This uses the jenkins job builder tool which can be installed - - $ pip install --user jenkins-job-builder - -The jobs/ directory contains general templates for defining -jobs for the different build systems (autotools, python distutils, -perl ExtUtils::MakeMaker, etc) - -The projects/ directory contains the per-project config which -activates the desired jobs and configures them if needed. - -It is possible to see the raw jenkins configuration using - - $ jenkins-jobs test -r . libvirt-glib-build - -Before updating the jobs on the server a file is needed to provide -the login details - - $ cat jenkins_jobs.ini - [jenkins] - user=XXX - password=XXX - url=https://ci.centos.org - - -To update the jenkins server with all jobs - - $ jenkins-jobs --conf jenkins_jobs.ini update -r . - diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..391b970 --- /dev/null +++ b/README.markdown @@ -0,0 +1,48 @@ +Libvirt Jenkins CI +================== + +This repository contains jobs definitions for the libvirt Jenkins CI. + +They're supposed to be fed to the Jenkins Job Builder tool, which can +be installed either through your distribution's package manager, for +example using: + + # dnf install python3-jenkins-job-builder + +on Fedora, or straight from pip using: + + $ pip install --user jenkins-job-builder + +The `jobs/` directory contains general templates for defining jobs +for the different build systems, such as GNU `autotools`, Python's +`distutils`, Perl's `ExtUtils::MakeMaker` and so on. + +The `projects/` directory contains the per-project config which +activates the desired jobs and configures them if needed. + +It's possible to see the raw Jenkins configuration using either: + + $ jenkins-jobs test -x .git -x guests -r . + +to see al jobs, or: + + $ jenkins-jobs test -x .git -x guests -r . libvirt-master-build + +if you're interested in a single job. + +In order to apply the updated configuration on the server, you're +going to need a configuration file containing access information: + + $ cat jenkins.ini + [jenkins] + user=XXX + password=XXX + url=https://ci.centos.org + +To update the Jenkins server with all jobs, run: + + $ jenkins-jobs --conf jenkins.ini update -x .git -x guests -r . + +The `guests/` directory contains tools used to manage the CI guests +rather than the Jenkins server; they are documented separately in +`guests/README.markdown`. -- 2.13.6

We have a place specifically for defaults, so make use of it instead of setting the default in two separate places. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- jobs/autotools.yaml | 1 - jobs/defaults.yaml | 1 + jobs/go.yaml | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml index 3e4fdc2..19f62be 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -95,7 +95,6 @@ name: '{name}-{branch}-check' project-type: matrix description: '{title} Check' - check_env: '' workspace: '{name}-{branch}' child-workspace: '.' block-downstream: true diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 7180c13..0e628bb 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -9,5 +9,6 @@ if [ "$unamestr" = 'FreeBSD' ]; then MAKE='gmake' fi + check_env: | smp: 3 spam: ymankad@redhat.com libvirt-ci@redhat.com diff --git a/jobs/go.yaml b/jobs/go.yaml index e63846d..8eee6af 100644 --- a/jobs/go.yaml +++ b/jobs/go.yaml @@ -52,7 +52,6 @@ name: '{name}-{branch}-check' project-type: matrix description: '{title} Check' - check_env: '' workspace: '{name}-{branch}' child-workspace: '.' block-downstream: true -- 2.13.6

This environment variable is only used when running the test suite, so we can move it from make_env to check_env: doing so allows us to remove duplicated code used to set $MAKE in the libosinfo project. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- projects/libosinfo.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml index 77c0414..b11ab13 100644 --- a/projects/libosinfo.yaml +++ b/projects/libosinfo.yaml @@ -7,12 +7,7 @@ - libvirt-fedora-26 - libvirt-fedora-rawhide title: libosinfo - make_env: | - MAKE='make' - unamestr=`uname` - if [ "$unamestr" = 'FreeBSD' ]; then - MAKE='gmake' - fi + check_env: | export OSINFO_SYSTEM_DIR=$VIRT_PREFIX/share/osinfo jobs: - autotools-build-job: -- 2.13.6

We're limiting builds to CentOS and Fedora, or even just Fedora, in a lot of cases where the project builds just fine on Debian and even FreeBSD. Let's build all the things on all the operating systems! Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- projects/libosinfo.yaml | 4 ++++ projects/libvirt-glib.yaml | 4 ++++ projects/libvirt-go-xml.yaml | 4 ++++ projects/libvirt-go.yaml | 4 ++++ projects/libvirt-perl.yaml | 5 +++++ projects/libvirt-python.yaml | 4 ++++ projects/libvirt-sandbox.yaml | 2 ++ projects/libvirt-tck.yaml | 4 ++++ projects/libvirt.yaml | 16 ++++++++-------- projects/osinfo-db-tools.yaml | 4 ++++ projects/osinfo-db.yaml | 3 +++ projects/virt-manager.yaml | 4 ++++ projects/virt-viewer.yaml | 4 ++++ 13 files changed, 54 insertions(+), 8 deletions(-) diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml index b11ab13..5f703b8 100644 --- a/projects/libosinfo.yaml +++ b/projects/libosinfo.yaml @@ -3,9 +3,13 @@ name: libosinfo machines: - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: libosinfo check_env: | export OSINFO_SYSTEM_DIR=$VIRT_PREFIX/share/osinfo diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml index eba4646..e82dbcc 100644 --- a/projects/libvirt-glib.yaml +++ b/projects/libvirt-glib.yaml @@ -3,9 +3,13 @@ name: libvirt-glib machines: - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Libvirt GLib jobs: - autotools-build-job: diff --git a/projects/libvirt-go-xml.yaml b/projects/libvirt-go-xml.yaml index ebe06fb..bd57d5f 100644 --- a/projects/libvirt-go-xml.yaml +++ b/projects/libvirt-go-xml.yaml @@ -3,9 +3,13 @@ name: libvirt-go-xml machines: - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Libvirt Go XML jobs: - go-build-job: diff --git a/projects/libvirt-go.yaml b/projects/libvirt-go.yaml index 9ffdd0a..0fc7bec 100644 --- a/projects/libvirt-go.yaml +++ b/projects/libvirt-go.yaml @@ -3,9 +3,13 @@ name: libvirt-go machines: - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Libvirt Go jobs: - go-build-job: diff --git a/projects/libvirt-perl.yaml b/projects/libvirt-perl.yaml index 7646e27..5c314ec 100644 --- a/projects/libvirt-perl.yaml +++ b/projects/libvirt-perl.yaml @@ -2,10 +2,15 @@ - project: name: libvirt-perl machines: + - libvirt-centos-6 - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Libvirt Perl jobs: - perl-makemaker-build-job: diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml index cae8ca7..de916aa 100644 --- a/projects/libvirt-python.yaml +++ b/projects/libvirt-python.yaml @@ -4,9 +4,13 @@ machines: - libvirt-centos-6 - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Libvirt Python jobs: - python-distutils-build-job: diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml index 2920084..9d6add8 100644 --- a/projects/libvirt-sandbox.yaml +++ b/projects/libvirt-sandbox.yaml @@ -2,6 +2,8 @@ - project: name: libvirt-sandbox machines: + - libvirt-centos-7 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide diff --git a/projects/libvirt-tck.yaml b/projects/libvirt-tck.yaml index ca72f6c..29340cb 100644 --- a/projects/libvirt-tck.yaml +++ b/projects/libvirt-tck.yaml @@ -2,9 +2,13 @@ - project: name: libvirt-tck machines: + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Libvirt TCK jobs: - perl-modulebuild-build-job: diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml index 1b31c1b..5661066 100644 --- a/projects/libvirt.yaml +++ b/projects/libvirt.yaml @@ -4,6 +4,8 @@ machines: - libvirt-centos-6 - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide @@ -24,14 +26,6 @@ - libvirt-freebsd-11 - autotools-syntax-check-job: parent_jobs: 'libvirt-master-build' - machines: - - libvirt-centos-6 - - libvirt-centos-7 - - libvirt-debian-8 - - libvirt-debian-9 - - libvirt-fedora-25 - - libvirt-fedora-26 - - libvirt-fedora-rawhide - autotools-check-job: parent_jobs: 'libvirt-master-syntax-check' check_env: | @@ -39,6 +33,12 @@ export VIR_TEST_DEBUG=2 - autotools-rpm-job: parent_jobs: 'libvirt-master-check' + machines: + - libvirt-centos-6 + - libvirt-centos-7 + - libvirt-fedora-25 + - libvirt-fedora-26 + - libvirt-fedora-rawhide - autotools-mingw-job: parent_jobs: machines: diff --git a/projects/osinfo-db-tools.yaml b/projects/osinfo-db-tools.yaml index 93931af..ca656ee 100644 --- a/projects/osinfo-db-tools.yaml +++ b/projects/osinfo-db-tools.yaml @@ -3,9 +3,13 @@ name: osinfo-db-tools machines: - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: osinfo database tools jobs: - autotools-build-job: diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml index 83eb92f..9fec36a 100644 --- a/projects/osinfo-db.yaml +++ b/projects/osinfo-db.yaml @@ -3,9 +3,12 @@ name: osinfo-db machines: - libvirt-centos-7 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: osinfo database jobs: - generic-build-job: diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml index a50e0ab..ecfd497 100644 --- a/projects/virt-manager.yaml +++ b/projects/virt-manager.yaml @@ -3,9 +3,13 @@ name: virt-manager machines: - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Virtual Machine Manager jobs: - python-distutils-build-job: diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml index e3ef04a..9726119 100644 --- a/projects/virt-viewer.yaml +++ b/projects/virt-viewer.yaml @@ -3,9 +3,13 @@ name: virt-viewer machines: - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 - libvirt-fedora-25 - libvirt-fedora-26 - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 title: Virt Viewer jobs: - autotools-build-job: -- 2.13.6

On Fri, Oct 27, 2017 at 02:43:26PM +0200, Andrea Bolognani wrote:
Changes from [v1]:
* don't move project-specific environment variables to the default check_env.
[v1] https://www.redhat.com/archives/libvir-list/2017-October/msg01256.html
Andrea Bolognani (4): README: Update, expand and convert to Markdown jobs: Move check_env defaults projects: Set $OSINFO_SYSTEM_DIR in check_env projects: Expand test matrix
README | 34 ------------------------------ README.markdown | 48 +++++++++++++++++++++++++++++++++++++++++++ jobs/autotools.yaml | 1 - jobs/defaults.yaml | 1 + jobs/go.yaml | 1 - projects/libosinfo.yaml | 11 +++++----- projects/libvirt-glib.yaml | 4 ++++ projects/libvirt-go-xml.yaml | 4 ++++ projects/libvirt-go.yaml | 4 ++++ projects/libvirt-perl.yaml | 5 +++++ projects/libvirt-python.yaml | 4 ++++ projects/libvirt-sandbox.yaml | 2 ++ projects/libvirt-tck.yaml | 4 ++++ projects/libvirt.yaml | 16 +++++++-------- projects/osinfo-db-tools.yaml | 4 ++++ projects/osinfo-db.yaml | 3 +++ projects/virt-manager.yaml | 4 ++++ projects/virt-viewer.yaml | 4 ++++ 18 files changed, 104 insertions(+), 50 deletions(-) delete mode 100644 README create mode 100644 README.markdown
Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrange