[libvirt] [jenkins-ci PATCH v3 00/12] lcitool: Add 'build' action

Changes from [v2]: * rebase on top of master (dbc2de85f775) and integrate recent changes to build rules on the Jenkins side; * drop a commit that had already been merged in the meantime. Changes from [v1]: * rebase on top of master (985ab833be9b) and integrate recent changes to build rules on the Jenkins side; * build on more targets. [v2] https://www.redhat.com/archives/libvir-list/2018-August/msg01109.html [v1] https://www.redhat.com/archives/libvir-list/2018-August/msg00393.html Andrea Bolognani (12): jobs: Rename git-url -> git_url jobs: Remove archive_format from defaults jobs: Move some parameters from jobs to defaults jobs: Declare empty values consistently guests: Add build jobs guests: Add build projects guests: Add build playbook lcitool: Make playbook execution generic lcitool: Add 'build' action lcitool: Support building arbitrary branches guests: Support building on more targets lcitool: Document build action guests/README.markdown | 19 +++ guests/lcitool | 109 ++++++++++-------- .../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 | 42 +++++++ .../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 +++ guests/playbooks/build/main.yml | 16 +++ guests/playbooks/build/projects/libosinfo.yml | 36 ++++++ .../playbooks/build/projects/libvirt-cim.yml | 10 ++ .../playbooks/build/projects/libvirt-dbus.yml | 52 +++++++++ .../playbooks/build/projects/libvirt-glib.yml | 38 ++++++ .../build/projects/libvirt-go-xml.yml | 13 +++ .../playbooks/build/projects/libvirt-go.yml | 13 +++ .../playbooks/build/projects/libvirt-perl.yml | 19 +++ .../build/projects/libvirt-python.yml | 13 +++ .../build/projects/libvirt-sandbox.yml | 30 +++++ .../playbooks/build/projects/libvirt-tck.yml | 27 +++++ guests/playbooks/build/projects/libvirt.yml | 57 +++++++++ .../build/projects/osinfo-db-tools.yml | 36 ++++++ guests/playbooks/build/projects/osinfo-db.yml | 23 ++++ .../playbooks/build/projects/virt-manager.yml | 42 +++++++ .../playbooks/build/projects/virt-viewer.yml | 40 +++++++ jobs/autotools.yaml | 3 +- jobs/defaults.yaml | 8 +- jobs/generic.yaml | 3 +- jobs/go.yaml | 3 +- jobs/perl-modulebuild.yaml | 3 +- jobs/python-distutils.yaml | 3 +- projects/libosinfo.yaml | 3 +- projects/libvirt-cim.yaml | 3 +- projects/libvirt-dbus.yaml | 8 +- projects/libvirt-glib.yaml | 3 +- projects/libvirt-go-xml.yaml | 3 +- projects/libvirt-go.yaml | 3 +- projects/libvirt-perl.yaml | 3 +- projects/libvirt-python.yaml | 3 +- projects/libvirt-sandbox.yaml | 3 +- projects/libvirt-tck.yaml | 3 +- projects/libvirt.yaml | 2 +- projects/osinfo-db-tools.yaml | 3 +- projects/osinfo-db.yaml | 2 +- projects/virt-manager.yaml | 7 +- projects/virt-viewer.yaml | 3 +- 57 files changed, 852 insertions(+), 77 deletions(-) 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 create mode 100644 guests/playbooks/build/main.yml create mode 100644 guests/playbooks/build/projects/libosinfo.yml create mode 100644 guests/playbooks/build/projects/libvirt-cim.yml create mode 100644 guests/playbooks/build/projects/libvirt-dbus.yml create mode 100644 guests/playbooks/build/projects/libvirt-glib.yml create mode 100644 guests/playbooks/build/projects/libvirt-go-xml.yml create mode 100644 guests/playbooks/build/projects/libvirt-go.yml create mode 100644 guests/playbooks/build/projects/libvirt-perl.yml create mode 100644 guests/playbooks/build/projects/libvirt-python.yml create mode 100644 guests/playbooks/build/projects/libvirt-sandbox.yml create mode 100644 guests/playbooks/build/projects/libvirt-tck.yml create mode 100644 guests/playbooks/build/projects/libvirt.yml create mode 100644 guests/playbooks/build/projects/osinfo-db-tools.yml create mode 100644 guests/playbooks/build/projects/osinfo-db.yml create mode 100644 guests/playbooks/build/projects/virt-manager.yml create mode 100644 guests/playbooks/build/projects/virt-viewer.yml -- 2.17.1

Other user-defined variables use underscores as separator instead of dashes; this change will also help us out later. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- jobs/autotools.yaml | 2 +- jobs/generic.yaml | 2 +- jobs/go.yaml | 2 +- jobs/perl-modulebuild.yaml | 2 +- jobs/python-distutils.yaml | 2 +- projects/libosinfo.yaml | 2 +- projects/libvirt-cim.yaml | 2 +- projects/libvirt-dbus.yaml | 2 +- projects/libvirt-glib.yaml | 2 +- projects/libvirt-go-xml.yaml | 2 +- projects/libvirt-go.yaml | 2 +- projects/libvirt-perl.yaml | 2 +- projects/libvirt-python.yaml | 2 +- projects/libvirt-sandbox.yaml | 2 +- projects/libvirt-tck.yaml | 2 +- projects/libvirt.yaml | 2 +- projects/osinfo-db-tools.yaml | 2 +- projects/osinfo-db.yaml | 2 +- projects/virt-manager.yaml | 2 +- projects/virt-viewer.yaml | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml index f8a7e87..1ceb8a1 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: '{git-url}' + url: '{git_url}' branches: - origin/{branch} clean: diff --git a/jobs/generic.yaml b/jobs/generic.yaml index 6c59c63..48bec23 100644 --- a/jobs/generic.yaml +++ b/jobs/generic.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: '{git-url}' + url: '{git_url}' branches: - origin/{branch} clean: diff --git a/jobs/go.yaml b/jobs/go.yaml index 10518c4..77c931b 100644 --- a/jobs/go.yaml +++ b/jobs/go.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: '{git-url}' + url: '{git_url}' branches: - origin/{branch} clean: diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml index 8b30d7e..8d0d87f 100644 --- a/jobs/perl-modulebuild.yaml +++ b/jobs/perl-modulebuild.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: '{git-url}' + url: '{git_url}' branches: - origin/{branch} clean: diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index 7fcc2c6..d5be99f 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: '{git-url}' + url: '{git_url}' branches: - origin/{branch} clean: diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml index 22c957e..614eb63 100644 --- a/projects/libosinfo.yaml +++ b/projects/libosinfo.yaml @@ -3,7 +3,7 @@ name: libosinfo machines: '{all_machines}' title: libosinfo - git-url: https://gitlab.com/libosinfo/libosinfo.git + git_url: https://gitlab.com/libosinfo/libosinfo.git jobs: - autotools-build-job: parent_jobs: 'osinfo-db-master-build' diff --git a/projects/libvirt-cim.yaml b/projects/libvirt-cim.yaml index c6a7a6d..027c31d 100644 --- a/projects/libvirt-cim.yaml +++ b/projects/libvirt-cim.yaml @@ -3,7 +3,7 @@ name: libvirt-cim machines: '{rpm_machines}' title: libvirt CIM - git-url: https://github.com/libvirt/libvirt-cim.git + git_url: https://github.com/libvirt/libvirt-cim.git jobs: - autotools-build-job: parent_jobs: 'libvirt-master-build' diff --git a/projects/libvirt-dbus.yaml b/projects/libvirt-dbus.yaml index 74163b7..43c6bed 100644 --- a/projects/libvirt-dbus.yaml +++ b/projects/libvirt-dbus.yaml @@ -12,7 +12,7 @@ - libvirt-freebsd-11 title: Libvirt D-Bus archive_format: xz - git-url: https://github.com/libvirt/libvirt-dbus.git + git_url: https://github.com/libvirt/libvirt-dbus.git jobs: - autotools-build-job: parent_jobs: 'libvirt-glib-master-build' diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml index f61ca1e..dd2ba0c 100644 --- a/projects/libvirt-glib.yaml +++ b/projects/libvirt-glib.yaml @@ -3,7 +3,7 @@ name: libvirt-glib machines: '{all_machines}' title: Libvirt GLib - git-url: https://github.com/libvirt/libvirt-glib.git + git_url: https://github.com/libvirt/libvirt-glib.git jobs: - autotools-build-job: parent_jobs: 'libvirt-master-build' diff --git a/projects/libvirt-go-xml.yaml b/projects/libvirt-go-xml.yaml index 6eb7ef0..4e44561 100644 --- a/projects/libvirt-go-xml.yaml +++ b/projects/libvirt-go-xml.yaml @@ -3,7 +3,7 @@ name: libvirt-go-xml machines: '{all_machines}' title: Libvirt Go XML - git-url: https://github.com/libvirt/libvirt-go-xml.git + git_url: https://github.com/libvirt/libvirt-go-xml.git jobs: - go-build-job: parent_jobs: 'libvirt-master-build' diff --git a/projects/libvirt-go.yaml b/projects/libvirt-go.yaml index 0495374..7046dab 100644 --- a/projects/libvirt-go.yaml +++ b/projects/libvirt-go.yaml @@ -3,7 +3,7 @@ name: libvirt-go machines: '{all_machines}' title: Libvirt Go - git-url: https://github.com/libvirt/libvirt-go.git + git_url: https://github.com/libvirt/libvirt-go.git jobs: - go-build-job: parent_jobs: 'libvirt-master-build' diff --git a/projects/libvirt-perl.yaml b/projects/libvirt-perl.yaml index 956ba93..8426a67 100644 --- a/projects/libvirt-perl.yaml +++ b/projects/libvirt-perl.yaml @@ -3,7 +3,7 @@ name: libvirt-perl machines: '{all_machines}' title: Libvirt Perl - git-url: https://github.com/libvirt/libvirt-perl.git + git_url: https://github.com/libvirt/libvirt-perl.git jobs: - perl-modulebuild-build-job: parent_jobs: 'libvirt-master-build' diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml index fdc55e0..69c1e17 100644 --- a/projects/libvirt-python.yaml +++ b/projects/libvirt-python.yaml @@ -3,7 +3,7 @@ name: libvirt-python machines: '{all_machines}' title: Libvirt Python - git-url: https://github.com/libvirt/libvirt-python.git + git_url: https://github.com/libvirt/libvirt-python.git jobs: - python-distutils-build-job: parent_jobs: 'libvirt-master-build' diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml index aa1a206..fc9203a 100644 --- a/projects/libvirt-sandbox.yaml +++ b/projects/libvirt-sandbox.yaml @@ -11,7 +11,7 @@ - libvirt-fedora-28 - libvirt-fedora-rawhide title: Libvirt Sandbox - git-url: https://github.com/libvirt/libvirt-sandbox.git + git_url: https://github.com/libvirt/libvirt-sandbox.git jobs: - autotools-build-job: parent_jobs: 'libvirt-glib-master-build' diff --git a/projects/libvirt-tck.yaml b/projects/libvirt-tck.yaml index 38f8c09..b98fd0a 100644 --- a/projects/libvirt-tck.yaml +++ b/projects/libvirt-tck.yaml @@ -12,7 +12,7 @@ - libvirt-freebsd-10 - libvirt-freebsd-11 title: Libvirt TCK - git-url: https://github.com/libvirt/libvirt-tck.git + git_url: https://github.com/libvirt/libvirt-tck.git jobs: - perl-modulebuild-build-job: parent_jobs: 'libvirt-perl-master-build' diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml index ce4698e..e9db7cb 100644 --- a/projects/libvirt.yaml +++ b/projects/libvirt.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: Libvirt archive_format: xz - git-url: https://github.com/libvirt/libvirt.git + git_url: https://github.com/libvirt/libvirt.git jobs: - autotools-build-job: parent_jobs: diff --git a/projects/osinfo-db-tools.yaml b/projects/osinfo-db-tools.yaml index d4cef11..ccc960b 100644 --- a/projects/osinfo-db-tools.yaml +++ b/projects/osinfo-db-tools.yaml @@ -3,7 +3,7 @@ name: osinfo-db-tools machines: '{all_machines}' title: osinfo database tools - git-url: https://gitlab.com/libosinfo/osinfo-db-tools.git + git_url: https://gitlab.com/libosinfo/osinfo-db-tools.git jobs: - autotools-build-job: parent_jobs: diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml index 7ee84a3..185d943 100644 --- a/projects/osinfo-db.yaml +++ b/projects/osinfo-db.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: osinfo database archive_format: xz - git-url: https://gitlab.com/libosinfo/osinfo-db.git + git_url: https://gitlab.com/libosinfo/osinfo-db.git jobs: - generic-build-job: parent_jobs: 'osinfo-db-tools-master-build' diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml index 6f806af..d7fb419 100644 --- a/projects/virt-manager.yaml +++ b/projects/virt-manager.yaml @@ -10,7 +10,7 @@ - libvirt-freebsd-10 - libvirt-freebsd-11 title: Virtual Machine Manager - git-url: https://github.com/virt-manager/virt-manager.git + git_url: https://github.com/virt-manager/virt-manager.git jobs: - python-distutils-build-job: parent_jobs: diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml index 9188239..57aa55f 100644 --- a/projects/virt-viewer.yaml +++ b/projects/virt-viewer.yaml @@ -3,7 +3,7 @@ name: virt-viewer machines: '{all_machines}' title: Virt Viewer - git-url: https://pagure.io/virt-viewer.git + git_url: https://pagure.io/virt-viewer.git jobs: - autotools-build-job: parent_jobs: 'libvirt-glib-master-build' -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:16AM +0200, Andrea Bolognani wrote:
Other user-defined variables use underscores as separator instead of dashes; this change will also help us out later.
There are variables like child-workspace, block-upstream, days-to-keep, etc. in most of the templates under jobs/ which would fancy a similar care since you're striving for consistency in variable naming here. Anyway, I'm quite ambivalent about the patch, I don't mind having it in, but I don't feel like this is the kind of change we want to merge. Having said that though, there already are commits like that, so my argument is invalid. If you show some love to the other variables which suffer from the same "plague" too: Reviewed-by: Erik Skultety <eskultet@redhat.com>

On Wed, 2018-08-22 at 12:19 +0200, Erik Skultety wrote:
On Wed, Aug 22, 2018 at 11:44:16AM +0200, Andrea Bolognani wrote:
Other user-defined variables use underscores as separator instead of dashes; this change will also help us out later.
There are variables like child-workspace, block-upstream, days-to-keep, etc. in most of the templates under jobs/ which would fancy a similar care since you're striving for consistency in variable naming here. Anyway, I'm quite ambivalent about the patch, I don't mind having it in, but I don't feel like this is the kind of change we want to merge. Having said that though, there already are commits like that, so my argument is invalid.
If you show some love to the other variables which suffer from the same "plague" too:
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Note "user-defined" above: all the other names you mentioned are part of JJB's own grammar for defining jobs, so we couldn't change them even if we wanted to. Perhaps I should have expanded the "help us out later" bit in the commit message to explain that this is not a gratuitous change made just to satisfy my craving for consistency[1]: while JJB is okay with user variables having dashes is them, Ansible is very much not, and if you look ahead to patch 06/12 you'll see why keeping the existing name would just not work - hence this patch. [1] Though I'll admit I'm absolutely not above doing that ;) -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Aug 22, 2018 at 12:45:19PM +0200, Andrea Bolognani wrote:
On Wed, 2018-08-22 at 12:19 +0200, Erik Skultety wrote:
On Wed, Aug 22, 2018 at 11:44:16AM +0200, Andrea Bolognani wrote:
Other user-defined variables use underscores as separator instead of dashes; this change will also help us out later.
There are variables like child-workspace, block-upstream, days-to-keep, etc. in most of the templates under jobs/ which would fancy a similar care since you're striving for consistency in variable naming here. Anyway, I'm quite ambivalent about the patch, I don't mind having it in, but I don't feel like this is the kind of change we want to merge. Having said that though, there already are commits like that, so my argument is invalid.
If you show some love to the other variables which suffer from the same "plague" too:
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Note "user-defined" above: all the other names you mentioned are part of JJB's own grammar for defining jobs, so we couldn't change them even if we wanted to.
Perhaps I should have expanded the "help us out later" bit in the commit message to explain that this is not a gratuitous change made just to satisfy my craving for consistency[1]: while JJB is okay with user variables having dashes is them, Ansible is very much not, and if you look ahead to patch 06/12 you'll see why
Ah, good to know. Thanks, Erik
keeping the existing name would just not work - hence this patch.
[1] Though I'll admit I'm absolutely not above doing that ;) -- Andrea Bolognani / Red Hat / Virtualization
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Instead of defining a default and overriding it on a case-by-case basis, always define archive_format at the project level. This adds a bit of duplication, but it's consistent with how we define other metadata for projects and it will help us out later. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- jobs/defaults.yaml | 1 - projects/libosinfo.yaml | 1 + projects/libvirt-cim.yaml | 1 + projects/libvirt-glib.yaml | 1 + projects/libvirt-go-xml.yaml | 1 + projects/libvirt-go.yaml | 1 + projects/libvirt-perl.yaml | 1 + projects/libvirt-python.yaml | 1 + projects/libvirt-sandbox.yaml | 1 + projects/libvirt-tck.yaml | 1 + projects/osinfo-db-tools.yaml | 1 + projects/virt-manager.yaml | 1 + projects/virt-viewer.yaml | 1 + 13 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index bab5bc4..5927ce3 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -20,7 +20,6 @@ - libvirt-fedora-rawhide mingw_machines: - libvirt-fedora-rawhide - archive_format: gz global_env: | local_env: | strip_buildrequires: | diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml index 614eb63..55a4817 100644 --- a/projects/libosinfo.yaml +++ b/projects/libosinfo.yaml @@ -3,6 +3,7 @@ name: libosinfo machines: '{all_machines}' title: libosinfo + archive_format: gz git_url: https://gitlab.com/libosinfo/libosinfo.git jobs: - autotools-build-job: diff --git a/projects/libvirt-cim.yaml b/projects/libvirt-cim.yaml index 027c31d..6d524df 100644 --- a/projects/libvirt-cim.yaml +++ b/projects/libvirt-cim.yaml @@ -3,6 +3,7 @@ name: libvirt-cim machines: '{rpm_machines}' title: libvirt CIM + archive_format: gz git_url: https://github.com/libvirt/libvirt-cim.git jobs: - autotools-build-job: diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml index dd2ba0c..993024a 100644 --- a/projects/libvirt-glib.yaml +++ b/projects/libvirt-glib.yaml @@ -3,6 +3,7 @@ name: libvirt-glib machines: '{all_machines}' title: Libvirt GLib + archive_format: gz git_url: https://github.com/libvirt/libvirt-glib.git jobs: - autotools-build-job: diff --git a/projects/libvirt-go-xml.yaml b/projects/libvirt-go-xml.yaml index 4e44561..7e6e090 100644 --- a/projects/libvirt-go-xml.yaml +++ b/projects/libvirt-go-xml.yaml @@ -3,6 +3,7 @@ name: libvirt-go-xml machines: '{all_machines}' title: Libvirt Go XML + archive_format: gz git_url: https://github.com/libvirt/libvirt-go-xml.git jobs: - go-build-job: diff --git a/projects/libvirt-go.yaml b/projects/libvirt-go.yaml index 7046dab..d90339a 100644 --- a/projects/libvirt-go.yaml +++ b/projects/libvirt-go.yaml @@ -3,6 +3,7 @@ name: libvirt-go machines: '{all_machines}' title: Libvirt Go + archive_format: gz git_url: https://github.com/libvirt/libvirt-go.git jobs: - go-build-job: diff --git a/projects/libvirt-perl.yaml b/projects/libvirt-perl.yaml index 8426a67..dbb6caf 100644 --- a/projects/libvirt-perl.yaml +++ b/projects/libvirt-perl.yaml @@ -3,6 +3,7 @@ name: libvirt-perl machines: '{all_machines}' title: Libvirt Perl + archive_format: gz git_url: https://github.com/libvirt/libvirt-perl.git jobs: - perl-modulebuild-build-job: diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml index 69c1e17..05eea41 100644 --- a/projects/libvirt-python.yaml +++ b/projects/libvirt-python.yaml @@ -3,6 +3,7 @@ name: libvirt-python machines: '{all_machines}' title: Libvirt Python + archive_format: gz git_url: https://github.com/libvirt/libvirt-python.git jobs: - python-distutils-build-job: diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml index fc9203a..0831896 100644 --- a/projects/libvirt-sandbox.yaml +++ b/projects/libvirt-sandbox.yaml @@ -11,6 +11,7 @@ - libvirt-fedora-28 - libvirt-fedora-rawhide title: Libvirt Sandbox + archive_format: gz git_url: https://github.com/libvirt/libvirt-sandbox.git jobs: - autotools-build-job: diff --git a/projects/libvirt-tck.yaml b/projects/libvirt-tck.yaml index b98fd0a..3c8adfd 100644 --- a/projects/libvirt-tck.yaml +++ b/projects/libvirt-tck.yaml @@ -12,6 +12,7 @@ - libvirt-freebsd-10 - libvirt-freebsd-11 title: Libvirt TCK + archive_format: gz git_url: https://github.com/libvirt/libvirt-tck.git jobs: - perl-modulebuild-build-job: diff --git a/projects/osinfo-db-tools.yaml b/projects/osinfo-db-tools.yaml index ccc960b..bcf9e0a 100644 --- a/projects/osinfo-db-tools.yaml +++ b/projects/osinfo-db-tools.yaml @@ -3,6 +3,7 @@ name: osinfo-db-tools machines: '{all_machines}' title: osinfo database tools + archive_format: gz git_url: https://gitlab.com/libosinfo/osinfo-db-tools.git jobs: - autotools-build-job: diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml index d7fb419..a89f90b 100644 --- a/projects/virt-manager.yaml +++ b/projects/virt-manager.yaml @@ -10,6 +10,7 @@ - libvirt-freebsd-10 - libvirt-freebsd-11 title: Virtual Machine Manager + archive_format: gz git_url: https://github.com/virt-manager/virt-manager.git jobs: - python-distutils-build-job: diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml index 57aa55f..884cf12 100644 --- a/projects/virt-viewer.yaml +++ b/projects/virt-viewer.yaml @@ -3,6 +3,7 @@ name: virt-viewer machines: '{all_machines}' title: Virt Viewer + archive_format: gz git_url: https://pagure.io/virt-viewer.git jobs: - autotools-build-job: -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:17AM +0200, Andrea Bolognani wrote:
Instead of defining a default and overriding it on a case-by-case basis, always define archive_format at the project level.
This adds a bit of duplication, but it's consistent with how we define other metadata for projects and it will help us out later.
How is it going to help us later? So here you move something which is perfectly fine to have in defaults and override it only when necessary and in the following patch you're making a preparation changes for essentially the opposite of this - moving autogen_args and similar to defaults (not that any template needs to override these at the moment, but I'm getting confused by the consistency you talk about). I think this patch should be dropped. Erik

On Wed, Aug 22, 2018 at 12:37:27PM +0200, Erik Skultety wrote:
On Wed, Aug 22, 2018 at 11:44:17AM +0200, Andrea Bolognani wrote:
Instead of defining a default and overriding it on a case-by-case basis, always define archive_format at the project level.
This adds a bit of duplication, but it's consistent with how we define other metadata for projects and it will help us out later.
How is it going to help us later? So here you move something which is perfectly fine to have in defaults and override it only when necessary and in the following patch you're making a preparation changes for essentially the opposite of this - moving autogen_args and similar to defaults (not that any template needs to override these at the moment, but I'm getting confused by the
Actually there are templates overriding those ones, but the point stays. Erik
consistency you talk about). I think this patch should be dropped.
Erik

On Wed, 2018-08-22 at 12:37 +0200, Erik Skultety wrote:
On Wed, Aug 22, 2018 at 11:44:17AM +0200, Andrea Bolognani wrote:
Instead of defining a default and overriding it on a case-by-case basis, always define archive_format at the project level.
This adds a bit of duplication, but it's consistent with how we define other metadata for projects and it will help us out later.
How is it going to help us later?
Welp, I should definitely have expanded on those "will help us out later" bits O:-)
So here you move something which is perfectly fine to have in defaults and override it only when necessary and in the following patch you're making a preparation changes for essentially the opposite of this - moving autogen_args and similar to defaults (not that any template needs to override these at the moment, but I'm getting confused by the consistency you talk about).
The ultimate goal is to translate the JJB jobs definitions to Ansible tasks while keeping the two as close as possible so that further changes can be applied pretty much verbatim to both and not make maintainance a nightmare. Problem is, some JJB constructs are awfully difficult to translate without adding extra boilerplate, so in those cases I opted for moving to a different construct instead. So for example autogen_args can be defined as a default because every time we need to override it we can use - autotools-build-job: autogen_args: --enable-gtk-doc which translates quite naturally to - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' vars: autogen_args: --enable-gtk-doc since variables passed to an included task are limited in scope to the included task and don't affect any other module call, but for archive_format we can't do the same because we want to translate - project: name: libvirt-dbus archive_format: xz to - set_fact: name: libvirt-dbus archive_format: xz and set_fact affects the *global* state, which means that it will overwrite the default every time it is called and subsequent tasks might break depending on the order they're called in. I guess I could create a task that takes care of stashing the existing defaults before overriding them with the project-appropriate ones, and another one that restores the previous values after running all tasks for a project, but as I said that's extra boilerplate that we can avoid thanks to this patch. (As an aside, I actually like having archive_format spelled out explicitly along with other project metadata such as name, title and git_url: it makes sense to me to have that kind of information all in one place. But the above is the actual reason why this patch is needed.) -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Aug 22, 2018 at 01:12:58PM +0200, Andrea Bolognani wrote:
On Wed, 2018-08-22 at 12:37 +0200, Erik Skultety wrote:
On Wed, Aug 22, 2018 at 11:44:17AM +0200, Andrea Bolognani wrote:
Instead of defining a default and overriding it on a case-by-case basis, always define archive_format at the project level.
This adds a bit of duplication, but it's consistent with how we define other metadata for projects and it will help us out later.
How is it going to help us later?
Welp, I should definitely have expanded on those "will help us out later" bits O:-)
So here you move something which is perfectly fine to have in defaults and override it only when necessary and in the following patch you're making a preparation changes for essentially the opposite of this - moving autogen_args and similar to defaults (not that any template needs to override these at the moment, but I'm getting confused by the consistency you talk about).
The ultimate goal is to translate the JJB jobs definitions to Ansible tasks while keeping the two as close as possible so that further changes can be applied pretty much verbatim to both and not make maintainance a nightmare.
Problem is, some JJB constructs are awfully difficult to translate without adding extra boilerplate, so in those cases I opted for moving to a different construct instead.
So for example autogen_args can be defined as a default because every time we need to override it we can use
- autotools-build-job: autogen_args: --enable-gtk-doc
which translates quite naturally to
- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' vars: autogen_args: --enable-gtk-doc
since variables passed to an included task are limited in scope to the included task and don't affect any other module call, but for archive_format we can't do the same because we want to translate
- project: name: libvirt-dbus archive_format: xz
to
- set_fact: name: libvirt-dbus archive_format: xz
and set_fact affects the *global* state, which means that it will overwrite the default every time it is called and subsequent tasks might break depending on the order they're called in.
Understood.
I guess I could create a task that takes care of stashing the
Nah, that would just cause more confusion. I'd appreciate if you managed to put a much condensed version of your explanation into the commit message for future generations :). Reviewed-by: Erik Skultety <eskultet@redhat.com>
existing defaults before overriding them with the project-appropriate ones, and another one that restores the previous values after running all tasks for a project, but as I said that's extra boilerplate that we can avoid thanks to this patch.
(As an aside, I actually like having archive_format spelled out explicitly along with other project metadata such as name, title and git_url: it makes sense to me to have that kind of information all in one place. But the above is the actual reason why this patch is needed.)
-- Andrea Bolognani / Red Hat / Virtualization

The affected parameters are autogen_args, command and command_pre_build. Moving their default value next to the other overridable defaults makes sense, and it will help us out later. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- jobs/autotools.yaml | 1 - jobs/defaults.yaml | 3 +++ jobs/generic.yaml | 1 - jobs/go.yaml | 1 - jobs/perl-modulebuild.yaml | 1 - jobs/python-distutils.yaml | 1 - 6 files changed, 3 insertions(+), 5 deletions(-) diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml index 1ceb8a1..4232d0e 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -4,7 +4,6 @@ name: '{name}-{branch}-build{variant}' project-type: matrix description: '{title} Build' - autogen_args: '' workspace: '{name}-{branch}{variant}' child-workspace: '.' block-downstream: true diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 5927ce3..19b711f 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -22,6 +22,9 @@ - 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* diff --git a/jobs/generic.yaml b/jobs/generic.yaml index 48bec23..805b1d6 100644 --- a/jobs/generic.yaml +++ b/jobs/generic.yaml @@ -4,7 +4,6 @@ name: '{name}-{branch}-build{variant}' project-type: matrix description: '{title} Build' - autogen_args: '' workspace: '{name}-{branch}{variant}' child-workspace: '.' block-downstream: true diff --git a/jobs/go.yaml b/jobs/go.yaml index 77c931b..b460658 100644 --- a/jobs/go.yaml +++ b/jobs/go.yaml @@ -4,7 +4,6 @@ name: '{name}-{branch}-build{variant}' project-type: matrix description: '{title} Build' - autogen_args: '' workspace: '{name}-{branch}{variant}' child-workspace: '.' block-downstream: true diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml index 8d0d87f..01247a3 100644 --- a/jobs/perl-modulebuild.yaml +++ b/jobs/perl-modulebuild.yaml @@ -4,7 +4,6 @@ name: '{name}-{branch}-build{variant}' project-type: matrix description: '{title} Build' - autogen_args: '' workspace: '{name}-{branch}{variant}' child-workspace: '.' block-downstream: true diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index d5be99f..1227b8c 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -4,7 +4,6 @@ name: '{name}-{branch}-build{variant}' project-type: matrix description: '{title} Build' - command_pre_build: '' workspace: '{name}-{branch}{variant}' child-workspace: '.' block-downstream: true -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:18AM +0200, Andrea Bolognani wrote:
The affected parameters are autogen_args, command and command_pre_build.
Moving their default value next to the other overridable defaults makes sense, and it will help us out later.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

The pipe syntax is intended for multi-line preformatted text, and is abused here. Use a saner syntax instead. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- jobs/defaults.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 19b711f..8f11860 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -20,8 +20,8 @@ - libvirt-fedora-rawhide mingw_machines: - libvirt-fedora-rawhide - global_env: | - local_env: | + global_env: '' + local_env: '' autogen_args: '' command: '' command_pre_build: '' -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:19AM +0200, Andrea Bolognani wrote:
The pipe syntax is intended for multi-line preformatted text, and is abused here. Use a saner syntax instead.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

These tasks mirror the Jenkins jobs contained in the top-level jobs/ directory. Signed-off-by: Andrea Bolognani <abologna@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

On Wed, Aug 22, 2018 at 11:44:20AM +0200, Andrea Bolognani wrote:
These tasks mirror the Jenkins jobs contained in the top-level jobs/ directory.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

These tasks mirror the Jenkins projects contained in the top-level projects/ directory. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/projects/libosinfo.yml | 36 +++++++++++++ .../playbooks/build/projects/libvirt-cim.yml | 10 ++++ .../playbooks/build/projects/libvirt-dbus.yml | 40 ++++++++++++++ .../playbooks/build/projects/libvirt-glib.yml | 38 +++++++++++++ .../build/projects/libvirt-go-xml.yml | 13 +++++ .../playbooks/build/projects/libvirt-go.yml | 13 +++++ .../playbooks/build/projects/libvirt-perl.yml | 19 +++++++ .../build/projects/libvirt-python.yml | 13 +++++ .../build/projects/libvirt-sandbox.yml | 27 ++++++++++ .../playbooks/build/projects/libvirt-tck.yml | 23 ++++++++ guests/playbooks/build/projects/libvirt.yml | 54 +++++++++++++++++++ .../build/projects/osinfo-db-tools.yml | 36 +++++++++++++ guests/playbooks/build/projects/osinfo-db.yml | 23 ++++++++ .../playbooks/build/projects/virt-manager.yml | 35 ++++++++++++ .../playbooks/build/projects/virt-viewer.yml | 40 ++++++++++++++ 15 files changed, 420 insertions(+) create mode 100644 guests/playbooks/build/projects/libosinfo.yml create mode 100644 guests/playbooks/build/projects/libvirt-cim.yml create mode 100644 guests/playbooks/build/projects/libvirt-dbus.yml create mode 100644 guests/playbooks/build/projects/libvirt-glib.yml create mode 100644 guests/playbooks/build/projects/libvirt-go-xml.yml create mode 100644 guests/playbooks/build/projects/libvirt-go.yml create mode 100644 guests/playbooks/build/projects/libvirt-perl.yml create mode 100644 guests/playbooks/build/projects/libvirt-python.yml create mode 100644 guests/playbooks/build/projects/libvirt-sandbox.yml create mode 100644 guests/playbooks/build/projects/libvirt-tck.yml create mode 100644 guests/playbooks/build/projects/libvirt.yml create mode 100644 guests/playbooks/build/projects/osinfo-db-tools.yml create mode 100644 guests/playbooks/build/projects/osinfo-db.yml create mode 100644 guests/playbooks/build/projects/virt-manager.yml create mode 100644 guests/playbooks/build/projects/virt-viewer.yml diff --git a/guests/playbooks/build/projects/libosinfo.yml b/guests/playbooks/build/projects/libosinfo.yml new file mode 100644 index 0000000..c29053b --- /dev/null +++ b/guests/playbooks/build/projects/libosinfo.yml @@ -0,0 +1,36 @@ +--- +- set_fact: + name: libosinfo + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://gitlab.com/libosinfo/libosinfo.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw32 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw32 + local_env: '{{ mingw32_local_env }}' + autogen_args: '{{ mingw32_autogen_args }}' + machines: '{{ mingw_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw64 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw64 + local_env: '{{ mingw64_local_env }}' + autogen_args: '{{ mingw64_autogen_args }}' + machines: '{{ mingw_machines }}' diff --git a/guests/playbooks/build/projects/libvirt-cim.yml b/guests/playbooks/build/projects/libvirt-cim.yml new file mode 100644 index 0000000..f959bf6 --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-cim.yml @@ -0,0 +1,10 @@ +--- +- set_fact: + name: libvirt-cim + machines: '{{ rpm_machines }}' + archive_format: gz + git_url: https://github.com/libvirt/libvirt-cim.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-dbus.yml b/guests/playbooks/build/projects/libvirt-dbus.yml new file mode 100644 index 0000000..2d8f77c --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-dbus.yml @@ -0,0 +1,40 @@ +--- +- set_fact: + name: libvirt-dbus + # Debian 8 doesn't have a recent enough GLib + machines: + - libvirt-centos-7 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + archive_format: xz + git_url: https://github.com/libvirt/libvirt-dbus.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' + vars: + # syntax-check uses Python 3, which CentOS 7 doesn't include + machines: + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 +- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' + vars: + # The test suite uses Python 3, which CentOS 7 doesn't include + machines: + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' diff --git a/guests/playbooks/build/projects/libvirt-glib.yml b/guests/playbooks/build/projects/libvirt-glib.yml new file mode 100644 index 0000000..0d8de9d --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-glib.yml @@ -0,0 +1,38 @@ +--- +- set_fact: + name: libvirt-glib + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://github.com/libvirt/libvirt-glib.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + autogen_args: --enable-gtk-doc +- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw32 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw32 + local_env: '{{ mingw32_local_env }}' + autogen_args: '{{ mingw32_autogen_args }}' + machines: '{{ mingw_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw64 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw64 + local_env: '{{ mingw64_local_env }}' + autogen_args: '{{ mingw64_autogen_args }}' + machines: '{{ mingw_machines }}' diff --git a/guests/playbooks/build/projects/libvirt-go-xml.yml b/guests/playbooks/build/projects/libvirt-go-xml.yml new file mode 100644 index 0000000..5dc86e7 --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-go-xml.yml @@ -0,0 +1,13 @@ +--- +- set_fact: + name: libvirt-go-xml + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://github.com/libvirt/libvirt-go-xml.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/go-build-job.yml' +- include: '{{ playbook_base }}/jobs/go-check-job.yml' + vars: + local_env: | + export TEST_ARGS="-tags xmlroundtrip" diff --git a/guests/playbooks/build/projects/libvirt-go.yml b/guests/playbooks/build/projects/libvirt-go.yml new file mode 100644 index 0000000..9316ef1 --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-go.yml @@ -0,0 +1,13 @@ +--- +- set_fact: + name: libvirt-go + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://github.com/libvirt/libvirt-go.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/go-build-job.yml' +- include: '{{ playbook_base }}/jobs/go-check-job.yml' + vars: + local_env: | + export TEST_ARGS="-tags api" diff --git a/guests/playbooks/build/projects/libvirt-perl.yml b/guests/playbooks/build/projects/libvirt-perl.yml new file mode 100644 index 0000000..6cb15bd --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-perl.yml @@ -0,0 +1,19 @@ +--- +- set_fact: + name: libvirt-perl + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://github.com/libvirt/libvirt-perl.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/perl-modulebuild-build-job.yml' + vars: + local_env: | + export TEST_MAINTAINER=1 +- include: '{{ playbook_base }}/jobs/perl-modulebuild-check-job.yml' + vars: + local_env: | + export TEST_MAINTAINER=1 +- include: '{{ playbook_base }}/jobs/perl-modulebuild-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' diff --git a/guests/playbooks/build/projects/libvirt-python.yml b/guests/playbooks/build/projects/libvirt-python.yml new file mode 100644 index 0000000..f2c39be --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-python.yml @@ -0,0 +1,13 @@ +--- +- set_fact: + name: libvirt-python + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://github.com/libvirt/libvirt-python.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/python-distutils-build-job.yml' +- include: '{{ playbook_base }}/jobs/python-distutils-check-job.yml' +- include: '{{ playbook_base }}/jobs/python-distutils-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' diff --git a/guests/playbooks/build/projects/libvirt-sandbox.yml b/guests/playbooks/build/projects/libvirt-sandbox.yml new file mode 100644 index 0000000..23be1f3 --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-sandbox.yml @@ -0,0 +1,27 @@ +--- +- set_fact: + name: libvirt-sandbox + # libvirt-sandbox is Linux only; among Linux platforms, CentOS 7 has + # to be excluded because it doesn't ship a version of xz suitable for + # linking statically + machines: + - libvirt-debian-8 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + archive_format: gz + git_url: https://github.com/libvirt/libvirt-sandbox.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + autogen_args: --enable-gtk-doc +- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' + vars: + machines: + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide diff --git a/guests/playbooks/build/projects/libvirt-tck.yml b/guests/playbooks/build/projects/libvirt-tck.yml new file mode 100644 index 0000000..13e63f4 --- /dev/null +++ b/guests/playbooks/build/projects/libvirt-tck.yml @@ -0,0 +1,23 @@ +--- +- set_fact: + name: libvirt-tck + machines: + - libvirt-debian-8 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + archive_format: gz + git_url: https://github.com/libvirt/libvirt-tck.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/perl-modulebuild-build-job.yml' +- include: '{{ playbook_base }}/jobs/perl-modulebuild-check-job.yml' +- include: '{{ playbook_base }}/jobs/perl-modulebuild-rpm-job.yml' + vars: + machines: + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide diff --git a/guests/playbooks/build/projects/libvirt.yml b/guests/playbooks/build/projects/libvirt.yml new file mode 100644 index 0000000..23ef13c --- /dev/null +++ b/guests/playbooks/build/projects/libvirt.yml @@ -0,0 +1,54 @@ +--- +- set_fact: + name: libvirt + machines: '{{ all_machines }}' + archive_format: xz + git_url: https://github.com/libvirt/libvirt.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' + vars: + # We limit syntax-check to Linux platforms because it calls some + # commands with more arguments than FreeBSD supports + machines: + - libvirt-centos-7 + - libvirt-debian-8 + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide +- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' + vars: + local_env: | + # gnulib's test-poll is broken on FreeBSD, so disable expensive + # tests (which include gnulib's test suite) until it's fixed + if [ "$(uname)" != "FreeBSD" ]; then + export VIR_TEST_EXPENSIVE=1 + fi + export VIR_TEST_DEBUG=2 +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw32 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw32 + local_env: '{{ mingw32_local_env }}' + autogen_args: '{{ mingw32_autogen_args }}' + machines: '{{ mingw_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw64 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw64 + local_env: '{{ mingw64_local_env }}' + autogen_args: '{{ mingw64_autogen_args }}' + machines: '{{ mingw_machines }}' diff --git a/guests/playbooks/build/projects/osinfo-db-tools.yml b/guests/playbooks/build/projects/osinfo-db-tools.yml new file mode 100644 index 0000000..a4b7c0e --- /dev/null +++ b/guests/playbooks/build/projects/osinfo-db-tools.yml @@ -0,0 +1,36 @@ +--- +- set_fact: + name: osinfo-db-tools + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://gitlab.com/libosinfo/osinfo-db-tools.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw32 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw32 + local_env: '{{ mingw32_local_env }}' + autogen_args: '{{ mingw32_autogen_args }}' + machines: '{{ mingw_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw64 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw64 + local_env: '{{ mingw64_local_env }}' + autogen_args: '{{ mingw64_autogen_args }}' + machines: '{{ mingw_machines }}' diff --git a/guests/playbooks/build/projects/osinfo-db.yml b/guests/playbooks/build/projects/osinfo-db.yml new file mode 100644 index 0000000..97bc31d --- /dev/null +++ b/guests/playbooks/build/projects/osinfo-db.yml @@ -0,0 +1,23 @@ +--- +- set_fact: + name: osinfo-db + machines: '{{ all_machines }}' + archive_format: xz + git_url: https://gitlab.com/libosinfo/osinfo-db.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/generic-build-job.yml' + vars: + command: | + $MAKE all + $MAKE install OSINFO_DB_TARGET="--system" +- include: '{{ playbook_base }}/jobs/generic-check-job.yml' + vars: + command: | + $MAKE check +- include: '{{ playbook_base }}/jobs/generic-rpm-job.yml' + vars: + machines: '{{ rpm_machines }}' + command: | + {{ strip_buildrequires }} + rpmbuild --clean --define "_topdir `pwd`/rpmbuild" --define "_sourcedir `pwd`" -ba osinfo-db.spec diff --git a/guests/playbooks/build/projects/virt-manager.yml b/guests/playbooks/build/projects/virt-manager.yml new file mode 100644 index 0000000..2f92a69 --- /dev/null +++ b/guests/playbooks/build/projects/virt-manager.yml @@ -0,0 +1,35 @@ +--- +- set_fact: + name: virt-manager + # virt-manager is Python 3 only, so it can't be built on CentOS 7 + machines: + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide + - libvirt-freebsd-10 + - libvirt-freebsd-11 + archive_format: gz + git_url: https://github.com/virt-manager/virt-manager.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/python-distutils-build-job.yml' + vars: + command_pre_build: | + $PYTHON ./setup.py configure --prefix=$VIRT_PREFIX +- include: '{{ playbook_base }}/jobs/python-distutils-check-job.yml' + vars: + # libxml2's Python 3 bindings don't work properly on FreeBSD, + # so skip the test suite there for the time being. See + # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224902 + machines: + - libvirt-debian-9 + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide +- include: '{{ playbook_base }}/jobs/python-distutils-rpm-job.yml' + vars: + machines: + - libvirt-fedora-27 + - libvirt-fedora-28 + - libvirt-fedora-rawhide diff --git a/guests/playbooks/build/projects/virt-viewer.yml b/guests/playbooks/build/projects/virt-viewer.yml new file mode 100644 index 0000000..04af2b3 --- /dev/null +++ b/guests/playbooks/build/projects/virt-viewer.yml @@ -0,0 +1,40 @@ +--- +- set_fact: + name: virt-viewer + machines: '{{ all_machines }}' + archive_format: gz + git_url: https://pagure.io/virt-viewer.git + +- include: '{{ playbook_base }}/jobs/prepare.yml' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' +- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' + vars: + # The spec file for virt-viewer requires a very recent version + # of spice-gtk, so we have to skip this job on older distros + machines: + - libvirt-fedora-28 + - libvirt-fedora-rawhide + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw32 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw32 + local_env: '{{ mingw32_local_env }}' + autogen_args: '{{ mingw32_autogen_args }}' + machines: '{{ mingw_machines }}' + +- include: '{{ playbook_base }}/jobs/prepare.yml' + vars: + variant: -mingw64 + machines: '{{ mingw_machines }}' +- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' + vars: + variant: -mingw64 + local_env: '{{ mingw64_local_env }}' + autogen_args: '{{ mingw64_autogen_args }}' + machines: '{{ mingw_machines }}' -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:21AM +0200, Andrea Bolognani wrote:
These tasks mirror the Jenkins projects contained in the top-level projects/ directory.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

This playbook represent the entry point for automated builds, and follows the same calling conventions as the existing update playbook. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 guests/playbooks/build/main.yml diff --git a/guests/playbooks/build/main.yml b/guests/playbooks/build/main.yml new file mode 100644 index 0000000..8abda67 --- /dev/null +++ b/guests/playbooks/build/main.yml @@ -0,0 +1,16 @@ +--- +- hosts: all + remote_user: '{{ flavor }}' + + vars_files: + - '{{ playbook_base }}/jobs/defaults.yml' + + tasks: + + - include: '{{ playbook_base }}/projects/{{ project }}.yml' + with_items: + '{{ selected_projects }}' + loop_control: + loop_var: project + when: + - project in projects -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:22AM +0200, Andrea Bolognani wrote:
This playbook represent the entry point for automated builds, and follows the same calling conventions as the existing update playbook.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 87 ++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index f28199d..e0410f3 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -351,6 +351,50 @@ class Application: help="list of projects to consider", ) + def _execute_playbook(self, playbook, hosts, projects): + base = Util.get_base() + + flavor = self._config.get_flavor() + vault_pass_file = self._config.get_vault_password_file() + root_pass_file = self._config.get_root_password_file() + + ansible_hosts = ",".join(self._inventory.expand_pattern(hosts)) + selected_projects = self._projects.expand_pattern(projects) + + ansible_cfg_path = os.path.join(base, "ansible.cfg") + playbook_base = os.path.join(base, "playbooks", playbook) + playbook_path = os.path.join(playbook_base, "main.yml") + + extra_vars = json.dumps({ + "base": base, + "playbook_base": playbook_base, + "root_password_file": root_pass_file, + "flavor": flavor, + "selected_projects": selected_projects, + }) + + cmd = [ + "ansible-playbook", + "--limit", ansible_hosts, + "--extra-vars", extra_vars, + ] + + # Provide the vault password if available + if vault_pass_file is not None: + cmd += ["--vault-password-file", vault_pass_file] + + cmd += [playbook_path] + + # We need to point Ansible to the correct configuration file, + # and for some reason this has to be done using the environment + # rather than through the command line + os.environ["ANSIBLE_CONFIG"] = ansible_cfg_path + + try: + subprocess.check_call(cmd) + except Exception: + raise Error("Failed to run {} on '{}'".format(playbook, hosts)) + def _action_hosts(self, _hosts, _projects): for host in self._inventory.expand_pattern("all"): print(host) @@ -431,48 +475,7 @@ class Application: raise Error("Failed to install '{}'".format(host)) def _action_update(self, hosts, projects): - base = Util.get_base() - - flavor = self._config.get_flavor() - vault_pass_file = self._config.get_vault_password_file() - root_pass_file = self._config.get_root_password_file() - - ansible_hosts = ",".join(self._inventory.expand_pattern(hosts)) - selected_projects = self._projects.expand_pattern(projects) - - ansible_cfg_path = os.path.join(base, "ansible.cfg") - playbook_base = os.path.join(base, "playbooks", "update") - playbook_path = os.path.join(playbook_base, "main.yml") - - extra_vars = json.dumps({ - "base": base, - "playbook_base": playbook_base, - "root_password_file": root_pass_file, - "flavor": flavor, - "selected_projects": selected_projects, - }) - - cmd = [ - "ansible-playbook", - "--limit", ansible_hosts, - "--extra-vars", extra_vars, - ] - - # Provide the vault password if available - if vault_pass_file is not None: - cmd += ["--vault-password-file", vault_pass_file] - - cmd += [playbook_path] - - # We need to point Ansible to the correct configuration file, - # and for some reason this has to be done using the environment - # rather than through the command line - os.environ["ANSIBLE_CONFIG"] = ansible_cfg_path - - try: - subprocess.check_call(cmd) - except Exception: - raise Error("Failed to update '{}'".format(hosts)) + self._execute_playbook("update", hosts, projects) def _action_dockerfile(self, hosts, projects): mappings = self._projects.get_mappings() -- 2.17.1

Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guests/lcitool b/guests/lcitool index e0410f3..2901a92 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -323,6 +323,7 @@ class Application: common actions: install perform unattended host installation update prepare hosts and keep them updated + build build projects on hosts informational actions: hosts list all known hosts @@ -477,6 +478,9 @@ class Application: def _action_update(self, hosts, projects): self._execute_playbook("update", hosts, projects) + def _action_build(self, hosts, projects): + self._execute_playbook("build", hosts, projects) + def _action_dockerfile(self, hosts, projects): mappings = self._projects.get_mappings() -- 2.17.1

Building master is useful for CI purposes and to debug CI failures locally, but when developing we want to be able to build a personal branch to validate in-progress changes. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 30 ++++++++++++++++-------- guests/playbooks/build/jobs/defaults.yml | 1 - 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 2901a92..ec81448 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -351,8 +351,13 @@ class Application: metavar="PROJECTS", help="list of projects to consider", ) + self._parser.add_argument( + "-b", + metavar="BRANCH", + help="git branch to use when performing builds", + ) - def _execute_playbook(self, playbook, hosts, projects): + def _execute_playbook(self, playbook, hosts, projects, branch): base = Util.get_base() flavor = self._config.get_flavor() @@ -372,6 +377,7 @@ class Application: "root_password_file": root_pass_file, "flavor": flavor, "selected_projects": selected_projects, + "branch": branch, }) cmd = [ @@ -396,15 +402,15 @@ class Application: except Exception: raise Error("Failed to run {} on '{}'".format(playbook, hosts)) - def _action_hosts(self, _hosts, _projects): + def _action_hosts(self, _hosts, _projects, _branch): for host in self._inventory.expand_pattern("all"): print(host) - def _action_projects(self, _hosts, _projects): + def _action_projects(self, _hosts, _projects, _branch): for project in self._projects.expand_pattern("all"): print(project) - def _action_install(self, hosts, _projects): + def _action_install(self, hosts, _projects, _branch): base = Util.get_base() flavor = self._config.get_flavor() @@ -475,13 +481,16 @@ class Application: except Exception: raise Error("Failed to install '{}'".format(host)) - def _action_update(self, hosts, projects): - self._execute_playbook("update", hosts, projects) + def _action_update(self, hosts, projects, _branch): + self._execute_playbook("update", hosts, projects, None) + + def _action_build(self, hosts, projects, branch): + if branch is None: + raise Error("Missing branch") - def _action_build(self, hosts, projects): - self._execute_playbook("build", hosts, projects) + self._execute_playbook("build", hosts, projects, branch) - def _action_dockerfile(self, hosts, projects): + def _action_dockerfile(self, hosts, projects, _branch): mappings = self._projects.get_mappings() hosts = self._inventory.expand_pattern(hosts) @@ -553,11 +562,12 @@ class Application: action = cmdline.a hosts = cmdline.h projects = cmdline.p + branch = cmdline.b method = "_action_{}".format(action.replace("-", "_")) if hasattr(self, method): - getattr(self, method).__call__(hosts, projects) + getattr(self, method).__call__(hosts, projects, branch) else: raise Error("Invalid action '{}'".format(action)) diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml index ce49f5a..b4e9343 100644 --- a/guests/playbooks/build/jobs/defaults.yml +++ b/guests/playbooks/build/jobs/defaults.yml @@ -1,5 +1,4 @@ --- -branch: master variant: '' all_machines: - libvirt-centos-7 -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:25AM +0200, Andrea Bolognani wrote:
Building master is useful for CI purposes and to debug CI failures locally, but when developing we want to be able to build a personal branch to validate in-progress changes.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 30 ++++++++++++++++-------- guests/playbooks/build/jobs/defaults.yml | 1 - 2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/guests/lcitool b/guests/lcitool index 2901a92..ec81448 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -351,8 +351,13 @@ class Application: metavar="PROJECTS", help="list of projects to consider", ) + self._parser.add_argument( + "-b", + metavar="BRANCH", + help="git branch to use when performing builds", + )
I agree with the idea, but the interface as proposed by the patch is not very convenient from user experience POV. The reason for that is having to specify a branch without a repo which IMHO feels incomplete, because if you actually need to use a custom branch, you most probably are testing a feature which means you want to work with your private copy of the upstream repo. You can modify the project's config, but that IMHO stops being convenient very soon as one day you want to test upstream CI failures locally and then test your feature the other, thus having to modify the git_url in the config each time. So, we need a quick cmdline override to make this a better interface. We also might want to have this working when building multiple projects, e.g. I'm working on a feature in libvirt and then propagate the necessary changes into virt-manager, so I want to build both projects using a custom repo and branch. The other thing I quite don't don't agree with is having the cmdline parameter mandatory, as a user, I'd expect that if I don't specify the repo and branch, the default which we already ship would be used, so my preference would be to have it optional. Since we already had a private discussion about possible approaches, I'll leave summarizing that on the list to you. Nevertheless, the series doesn't really depend on this patch and we can already start profiting from what the other patches provide and work on top of that. Erik

On Thu, 2018-08-23 at 14:36 +0200, Erik Skultety wrote:
On Wed, Aug 22, 2018 at 11:44:25AM +0200, Andrea Bolognani wrote:
Building master is useful for CI purposes and to debug CI failures locally, but when developing we want to be able to build a personal branch to validate in-progress changes.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 30 ++++++++++++++++-------- guests/playbooks/build/jobs/defaults.yml | 1 - 2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/guests/lcitool b/guests/lcitool index 2901a92..ec81448 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -351,8 +351,13 @@ class Application: metavar="PROJECTS", help="list of projects to consider", ) + self._parser.add_argument( + "-b", + metavar="BRANCH", + help="git branch to use when performing builds", + )
I agree with the idea, but the interface as proposed by the patch is not very convenient from user experience POV. The reason for that is having to specify a branch without a repo which IMHO feels incomplete, because if you actually need to use a custom branch, you most probably are testing a feature which means you want to work with your private copy of the upstream repo. You can modify the project's config, but that IMHO stops being convenient very soon as one day you want to test upstream CI failures locally and then test your feature the other, thus having to modify the git_url in the config each time. So, we need a quick cmdline override to make this a better interface.
Agreed, the current interface doesn't quite work.
We also might want to have this working when building multiple projects, e.g. I'm working on a feature in libvirt and then propagate the necessary changes into virt-manager, so I want to build both projects using a custom repo and branch.
The other thing I quite don't don't agree with is having the cmdline parameter mandatory, as a user, I'd expect that if I don't specify the repo and branch, the default which we already ship would be used, so my preference would be to have it optional.
I'll have to think hard about this. All of the current arguments are mandatory, so I would like to stick with that unless there's a compelling reason not to; perhaps in this case it's okay to make the arguments optional, but maybe all we need to do is provide a convenient enough shorthand for "build the master branch of the upstream repository" and the problem will basically disappear.
Since we already had a private discussion about possible approaches, I'll leave summarizing that on the list to you. Nevertheless, the series doesn't really depend on this patch and we can already start profiting from what the other patches provide and work on top of that.
Yeah, let's drop this patch for now: being able to build upstream's master branch conveniently is already a good feature to have, and once we have that in adding more becomes feasible. -- Andrea Bolognani / Red Hat / Virtualization

The Jenkins build jobs can only run on the subset of guests that are available on CentOS CI, but when we're running build jobs through lcitool we don't have that limitation and we can build on more targets. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/jobs/defaults.yml | 4 ++++ guests/playbooks/build/projects/libvirt-dbus.yml | 16 ++++++++++++++-- .../playbooks/build/projects/libvirt-sandbox.yml | 3 +++ guests/playbooks/build/projects/libvirt-tck.yml | 4 ++++ guests/playbooks/build/projects/libvirt.yml | 3 +++ guests/playbooks/build/projects/virt-manager.yml | 9 ++++++++- projects/libvirt-dbus.yaml | 6 ++++-- projects/virt-manager.yaml | 4 +++- 8 files changed, 43 insertions(+), 6 deletions(-) diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml index b4e9343..c07475c 100644 --- a/guests/playbooks/build/jobs/defaults.yml +++ b/guests/playbooks/build/jobs/defaults.yml @@ -4,11 +4,15 @@ all_machines: - libvirt-centos-7 - libvirt-debian-8 - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide - libvirt-freebsd-10 - libvirt-freebsd-11 + - libvirt-freebsd-current + - libvirt-ubuntu-16 + - libvirt-ubuntu-18 rpm_machines: - libvirt-centos-7 - libvirt-fedora-27 diff --git a/guests/playbooks/build/projects/libvirt-dbus.yml b/guests/playbooks/build/projects/libvirt-dbus.yml index 2d8f77c..d9f5d4a 100644 --- a/guests/playbooks/build/projects/libvirt-dbus.yml +++ b/guests/playbooks/build/projects/libvirt-dbus.yml @@ -5,11 +5,15 @@ machines: - libvirt-centos-7 - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide - libvirt-freebsd-10 - libvirt-freebsd-11 + - libvirt-freebsd-current + - libvirt-ubuntu-16 + - libvirt-ubuntu-18 archive_format: xz git_url: https://github.com/libvirt/libvirt-dbus.git @@ -17,24 +21,32 @@ - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' - include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' vars: - # syntax-check uses Python 3, which CentOS 7 doesn't include + # CentOS 7 doesn't include Python 3 and the version of pyflakes + # in FreeBSD CURRENT is too new to be used by flake8 machines: - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide - libvirt-freebsd-10 - libvirt-freebsd-11 + - libvirt-ubuntu-16 + - libvirt-ubuntu-18 - include: '{{ playbook_base }}/jobs/autotools-check-job.yml' vars: - # The test suite uses Python 3, which CentOS 7 doesn't include + # CentOS 7 doesn't include Python 3 and the version in Ubuntu + # 16.04 is too old machines: - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide - libvirt-freebsd-10 - libvirt-freebsd-11 + - libvirt-freebsd-current + - libvirt-ubuntu-18 - include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' vars: machines: '{{ rpm_machines }}' diff --git a/guests/playbooks/build/projects/libvirt-sandbox.yml b/guests/playbooks/build/projects/libvirt-sandbox.yml index 23be1f3..411cfc7 100644 --- a/guests/playbooks/build/projects/libvirt-sandbox.yml +++ b/guests/playbooks/build/projects/libvirt-sandbox.yml @@ -7,9 +7,12 @@ machines: - libvirt-debian-8 - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide + - libvirt-ubuntu-16 + - libvirt-ubuntu-18 archive_format: gz git_url: https://github.com/libvirt/libvirt-sandbox.git diff --git a/guests/playbooks/build/projects/libvirt-tck.yml b/guests/playbooks/build/projects/libvirt-tck.yml index 13e63f4..fa16d26 100644 --- a/guests/playbooks/build/projects/libvirt-tck.yml +++ b/guests/playbooks/build/projects/libvirt-tck.yml @@ -4,11 +4,15 @@ machines: - libvirt-debian-8 - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide - libvirt-freebsd-10 - libvirt-freebsd-11 + - libvirt-freebsd-current + - libvirt-ubuntu-16 + - libvirt-ubuntu-18 archive_format: gz git_url: https://github.com/libvirt/libvirt-tck.git diff --git a/guests/playbooks/build/projects/libvirt.yml b/guests/playbooks/build/projects/libvirt.yml index 23ef13c..bb3e53f 100644 --- a/guests/playbooks/build/projects/libvirt.yml +++ b/guests/playbooks/build/projects/libvirt.yml @@ -15,9 +15,12 @@ - libvirt-centos-7 - libvirt-debian-8 - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide + - libvirt-ubuntu-16 + - libvirt-ubuntu-18 - include: '{{ playbook_base }}/jobs/autotools-check-job.yml' vars: local_env: | diff --git a/guests/playbooks/build/projects/virt-manager.yml b/guests/playbooks/build/projects/virt-manager.yml index 2f92a69..fcd4fa4 100644 --- a/guests/playbooks/build/projects/virt-manager.yml +++ b/guests/playbooks/build/projects/virt-manager.yml @@ -1,14 +1,19 @@ --- - set_fact: name: virt-manager - # virt-manager is Python 3 only, so it can't be built on CentOS 7 + # virt-manager is Python 3 only, so it can't be built on CentOS 7; + # Debian 8 and Ubuntu 16.04 have Python 3 but not the libxml2 + # bindings so they can't build the project either machines: - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide - libvirt-freebsd-10 - libvirt-freebsd-11 + - libvirt-freebsd-current + - libvirt-ubuntu-18 archive_format: gz git_url: https://github.com/virt-manager/virt-manager.git @@ -24,9 +29,11 @@ # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224902 machines: - libvirt-debian-9 + - libvirt-debian-sid - libvirt-fedora-27 - libvirt-fedora-28 - libvirt-fedora-rawhide + - libvirt-ubuntu-18 - include: '{{ playbook_base }}/jobs/python-distutils-rpm-job.yml' vars: machines: diff --git a/projects/libvirt-dbus.yaml b/projects/libvirt-dbus.yaml index 43c6bed..5689345 100644 --- a/projects/libvirt-dbus.yaml +++ b/projects/libvirt-dbus.yaml @@ -18,7 +18,8 @@ parent_jobs: 'libvirt-glib-master-build' - autotools-syntax-check-job: parent_jobs: 'libvirt-dbus-master-build' - # syntax-check uses Python 3, which CentOS 7 doesn't include + # CentOS 7 doesn't include Python 3 and the version of pyflakes + # in FreeBSD CURRENT is too new to be used by flake8 machines: - libvirt-debian-9 - libvirt-fedora-27 @@ -28,7 +29,8 @@ - libvirt-freebsd-11 - autotools-check-job: parent_jobs: 'libvirt-dbus-master-syntax-check' - # The test suite uses Python 3, which CentOS 7 doesn't include + # CentOS 7 doesn't include Python 3 and the version in Ubuntu + # 16.04 is too old machines: - libvirt-debian-9 - libvirt-fedora-27 diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml index a89f90b..f7929d6 100644 --- a/projects/virt-manager.yaml +++ b/projects/virt-manager.yaml @@ -1,7 +1,9 @@ - project: name: virt-manager - # virt-manager is Python 3 only, so it can't be built on CentOS 7 + # virt-manager is Python 3 only, so it can't be built on CentOS 7; + # Debian 8 and Ubuntu 16.04 have Python 3 but not the libxml2 + # bindings so they can't build the project either machines: - libvirt-debian-9 - libvirt-fedora-27 -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:26AM +0200, Andrea Bolognani wrote:
The Jenkins build jobs can only run on the subset of guests that are available on CentOS CI, but when we're running build jobs through lcitool we don't have that limitation and we can build on more targets.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Provide some examples and scenarios. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/README.markdown | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/guests/README.markdown b/guests/README.markdown index ddf0149..870619e 100644 --- a/guests/README.markdown +++ b/guests/README.markdown @@ -46,6 +46,25 @@ related projects, while running will update all hosts and prepare them to build libvirt both as a native library and, where supported, as a Windows library using MinGW. +Once hosts have been prepared following the steps above, you can use +`lcitool` to perform builds as well: for example, running + + lcitool -a build -h '*debian*' -p libvirt-python -b master + +will fetch libvirt-python's `master` branch and build it on all Debian +hosts. + +This feature can be used to validate a series you've been working on +will not introduce any CI failures when merged: assuming you have a +personal clone of `$project` hosted somewhere and your changes are in +the `feature` branch, you can tweak the value of `git_url` in +`playbooks/build/projects/$project.yml` so that it points to your own +repository and then run + + lcitool -a build -h all -p $project -b feature + +to spot issues early. + Host setup ---------- -- 2.17.1

On Wed, Aug 22, 2018 at 11:44:27AM +0200, Andrea Bolognani wrote:
Provide some examples and scenarios.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> ---
Given my comments in patch 10, this will need some tweaking. Otherwise looks good. Erik

On Wed, Aug 22, 2018 at 11:44:15AM +0200, Andrea Bolognani wrote:
Changes from [v2]:
* rebase on top of master (dbc2de85f775) and integrate recent changes to build rules on the Jenkins side;
* drop a commit that had already been merged in the meantime.
Changes from [v1]:
* rebase on top of master (985ab833be9b) and integrate recent changes to build rules on the Jenkins side;
* build on more targets.
[v2] https://www.redhat.com/archives/libvir-list/2018-August/msg01109.html [v1] https://www.redhat.com/archives/libvir-list/2018-August/msg00393.html
Except for the arbitrary branch building, I think we're good and this can go in. Thank you for the feature. Erik

On Fri, 2018-08-24 at 09:47 +0200, Erik Skultety wrote:
On Wed, Aug 22, 2018 at 11:44:15AM +0200, Andrea Bolognani wrote:
Changes from [v2]:
* rebase on top of master (dbc2de85f775) and integrate recent changes to build rules on the Jenkins side;
* drop a commit that had already been merged in the meantime.
Changes from [v1]:
* rebase on top of master (985ab833be9b) and integrate recent changes to build rules on the Jenkins side;
* build on more targets.
[v2] https://www.redhat.com/archives/libvir-list/2018-August/msg01109.html [v1] https://www.redhat.com/archives/libvir-list/2018-August/msg00393.html
Except for the arbitrary branch building, I think we're good and this can go in. Thank you for the feature.
Thank *you* for the review :) I've pushed the series now. I'll work on a more sensible way to build off arbitrary repositories/branches next. -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Erik Skultety