[libvirt] [jenkins-ci PATCH 0/8] lcitool: Support building arbitrary branches

Better (hopefully :) implementation of the feature scrapped from the initial "build support" series. Andrea Bolognani (8): lcitool: Add "-r REVISION" argument for build Don't use "branch" in paths and job names jobs: Hardcode "master" branch guests: Use "git_branch" when building Drop "branch" variable Add "git_urls" dictionary to defaults guests: Use "git_remote" when building guests: Update documentation guests/README.markdown | 8 ++++- guests/lcitool | 36 +++++++++++++------ .../build/jobs/autotools-build-job.yml | 4 +-- .../build/jobs/autotools-check-job.yml | 4 +-- .../build/jobs/autotools-rpm-job.yml | 4 +-- .../build/jobs/autotools-syntax-check-job.yml | 4 +-- guests/playbooks/build/jobs/defaults.yml | 32 ++++++++++++++++- .../build/jobs/generic-build-job.yml | 4 +-- .../build/jobs/generic-check-job.yml | 4 +-- .../playbooks/build/jobs/generic-rpm-job.yml | 4 +-- .../build/jobs/generic-syntax-check-job.yml | 4 +-- guests/playbooks/build/jobs/go-build-job.yml | 4 +-- guests/playbooks/build/jobs/go-check-job.yml | 4 +-- .../build/jobs/perl-modulebuild-build-job.yml | 4 +-- .../build/jobs/perl-modulebuild-check-job.yml | 4 +-- .../build/jobs/perl-modulebuild-rpm-job.yml | 4 +-- guests/playbooks/build/jobs/prepare.yml | 10 +++--- .../build/jobs/python-distutils-build-job.yml | 4 +-- .../build/jobs/python-distutils-check-job.yml | 4 +-- .../build/jobs/python-distutils-rpm-job.yml | 4 +-- guests/playbooks/build/projects/libosinfo.yml | 2 +- .../playbooks/build/projects/libvirt-cim.yml | 2 +- .../playbooks/build/projects/libvirt-dbus.yml | 2 +- .../playbooks/build/projects/libvirt-glib.yml | 2 +- .../build/projects/libvirt-go-xml.yml | 2 +- .../playbooks/build/projects/libvirt-go.yml | 2 +- .../playbooks/build/projects/libvirt-perl.yml | 2 +- .../build/projects/libvirt-python.yml | 2 +- .../build/projects/libvirt-sandbox.yml | 2 +- .../playbooks/build/projects/libvirt-tck.yml | 2 +- guests/playbooks/build/projects/libvirt.yml | 2 +- .../build/projects/osinfo-db-tools.yml | 2 +- guests/playbooks/build/projects/osinfo-db.yml | 2 +- .../playbooks/build/projects/virt-manager.yml | 2 +- .../playbooks/build/projects/virt-viewer.yml | 2 +- jobs/autotools.yaml | 18 +++++----- jobs/defaults.yaml | 32 ++++++++++++++++- jobs/generic.yaml | 18 +++++----- jobs/go.yaml | 10 +++--- jobs/perl-modulebuild.yaml | 14 ++++---- jobs/python-distutils.yaml | 14 ++++---- projects/libosinfo.yaml | 14 ++++---- projects/libvirt-cim.yaml | 6 ++-- projects/libvirt-dbus.yaml | 10 +++--- projects/libvirt-glib.yaml | 14 ++++---- projects/libvirt-go-xml.yaml | 6 ++-- projects/libvirt-go.yaml | 6 ++-- projects/libvirt-perl.yaml | 8 ++--- projects/libvirt-python.yaml | 8 ++--- projects/libvirt-sandbox.yaml | 10 +++--- projects/libvirt-tck.yaml | 8 ++--- projects/libvirt.yaml | 8 ++--- projects/osinfo-db-tools.yaml | 8 ++--- projects/osinfo-db.yaml | 8 ++--- projects/virt-manager.yaml | 10 +++--- projects/virt-viewer.yaml | 14 ++++---- 56 files changed, 253 insertions(+), 171 deletions(-) -- 2.17.1

This will allow users to build arbitrary branches from arbitrary git repositories, but for the moment all it does is parse the argument and pass it down to the Ansible playbook. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 2901a92..c12143d 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( + "-r", + metavar="REVISION", + help="git revision to build (remote/branch)", + ) - def _execute_playbook(self, playbook, hosts, projects): + def _execute_playbook(self, playbook, hosts, projects, revision): base = Util.get_base() flavor = self._config.get_flavor() @@ -362,6 +367,14 @@ class Application: ansible_hosts = ",".join(self._inventory.expand_pattern(hosts)) selected_projects = self._projects.expand_pattern(projects) + if revision is None: + raise Error("Missing git revision") + tokens = revision.split('/') + if len(tokens) < 2: + raise Error("Invalid git revision '{}'".format(revision)) + git_remote = tokens[0] + git_branch = '/'.join(tokens[1:]) + 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") @@ -372,6 +385,8 @@ class Application: "root_password_file": root_pass_file, "flavor": flavor, "selected_projects": selected_projects, + "git_remote": git_remote, + "git_branch": git_branch, }) cmd = [ @@ -396,15 +411,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, _revision): for host in self._inventory.expand_pattern("all"): print(host) - def _action_projects(self, _hosts, _projects): + def _action_projects(self, _hosts, _projects, _revision): for project in self._projects.expand_pattern("all"): print(project) - def _action_install(self, hosts, _projects): + def _action_install(self, hosts, _projects, _revision): base = Util.get_base() flavor = self._config.get_flavor() @@ -475,13 +490,13 @@ 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, revision): + self._execute_playbook("update", hosts, projects, revision) - def _action_build(self, hosts, projects): - self._execute_playbook("build", hosts, projects) + def _action_build(self, hosts, projects, revision): + self._execute_playbook("build", hosts, projects, revision) - def _action_dockerfile(self, hosts, projects): + def _action_dockerfile(self, hosts, projects, _revision): mappings = self._projects.get_mappings() hosts = self._inventory.expand_pattern(hosts) @@ -553,11 +568,12 @@ class Application: action = cmdline.a hosts = cmdline.h projects = cmdline.p + revision = cmdline.r method = "_action_{}".format(action.replace("-", "_")) if hasattr(self, method): - getattr(self, method).__call__(hosts, projects) + getattr(self, method).__call__(hosts, projects, revision) else: raise Error("Invalid action '{}'".format(action)) -- 2.17.1

On Wed, 2018-08-29 at 17:08 +0200, Andrea Bolognani wrote:
This will allow users to build arbitrary branches from arbitrary git repositories, but for the moment all it does is parse the argument and pass it down to the Ansible playbook.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-)
As helpfully pointed out by Erik, this change has the unintended consequence of making '-r REVISION' mandatory every time a playbook is invoked, including when using '-a update'. The patch below fixes the issue; consider it squashed in. diff --git a/guests/lcitool b/guests/lcitool index c12143d..0729d55 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -367,13 +367,15 @@ class Application: ansible_hosts = ",".join(self._inventory.expand_pattern(hosts)) selected_projects = self._projects.expand_pattern(projects) - if revision is None: - raise Error("Missing git revision") - tokens = revision.split('/') - if len(tokens) < 2: - raise Error("Invalid git revision '{}'".format(revision)) - git_remote = tokens[0] - git_branch = '/'.join(tokens[1:]) + if revision is not None: + tokens = revision.split('/') + if len(tokens) < 2: + raise Error("Invalid git revision '{}'".format(revision)) + git_remote = tokens[0] + git_branch = '/'.join(tokens[1:]) + else: + git_remote = None + git_branch = None ansible_cfg_path = os.path.join(base, "ansible.cfg") playbook_base = os.path.join(base, "playbooks", playbook) @@ -494,6 +496,9 @@ class Application: self._execute_playbook("update", hosts, projects, revision) def _action_build(self, hosts, projects, revision): + if revision is None: + raise Error("Missing git revision") + self._execute_playbook("build", hosts, projects, revision) def _action_dockerfile(self, hosts, projects, _revision): -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Aug 31, 2018 at 12:16:14PM +0200, Andrea Bolognani wrote:
On Wed, 2018-08-29 at 17:08 +0200, Andrea Bolognani wrote:
This will allow users to build arbitrary branches from arbitrary git repositories, but for the moment all it does is parse the argument and pass it down to the Ansible playbook.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/lcitool | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-)
As helpfully pointed out by Erik, this change has the unintended consequence of making '-r REVISION' mandatory every time a playbook is invoked, including when using '-a update'.
The patch below fixes the issue; consider it squashed in.
diff --git a/guests/lcitool b/guests/lcitool index c12143d..0729d55 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -367,13 +367,15 @@ class Application: ansible_hosts = ",".join(self._inventory.expand_pattern(hosts)) selected_projects = self._projects.expand_pattern(projects)
- if revision is None: - raise Error("Missing git revision") - tokens = revision.split('/') - if len(tokens) < 2: - raise Error("Invalid git revision '{}'".format(revision)) - git_remote = tokens[0] - git_branch = '/'.join(tokens[1:]) + if revision is not None: + tokens = revision.split('/') + if len(tokens) < 2: + raise Error("Invalid git revision '{}'".format(revision)) + git_remote = tokens[0] + git_branch = '/'.join(tokens[1:]) + else: + git_remote = None + git_branch = None
Sorry for the delay. ^This should rather be: git_remote = "upstream" git_branch = "master" ... and the check below should go away, I still don't think we should mandate specifying revisions at all times. Initially, I wanted to point out that "revision" is probably not the best name given the information in man gitrevisions(7) and I wanted to suggest "refname" instead, but then I tried referencing both with <sha1> as well as <describeOutput> and it worked as expected, sweet. I also tried referencing with @{<n>}, however ansible documents that kind of limitation.
ansible_cfg_path = os.path.join(base, "ansible.cfg") playbook_base = os.path.join(base, "playbooks", playbook) @@ -494,6 +496,9 @@ class Application: self._execute_playbook("update", hosts, projects, revision)
def _action_build(self, hosts, projects, revision): + if revision is None: + raise Error("Missing git revision")
see above...as I said, I still don't see a reason for requiring ^this, if there truly is a compelling reason to keep it, then I'd suggest changing the default remote name to "origin" from "upstream", because it feels more natural and intuitive to me. Even though you document this in the README and I understand the reasoning - you can name your origin whatever you want + you can clone your fork and then add an upstream remote, but I wouldn't expect that to be very common practice. Other than that, the patch works. Erik
+ self._execute_playbook("build", hosts, projects, revision)
def _action_dockerfile(self, hosts, projects, _revision): -- Andrea Bolognani / Red Hat / Virtualization
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, 2018-09-04 at 09:55 +0200, Erik Skultety wrote:
Initially, I wanted to point out that "revision" is probably not the best name [...]
I was thinking yesterday that perhaps it would be better to use '-g GITREVISION' here instead, to leave '-r' available for future extensions, eg. when/if I get around to adding support for dependencies between projects that could be used to mean 'recursive', as in: build this one project and also all those that depend on it, the same way CentOS CI does it. Does that sound reasonable? [...]
def _action_build(self, hosts, projects, revision): + if revision is None: + raise Error("Missing git revision")
see above...as I said, I still don't see a reason for requiring ^this, if there truly is a compelling reason to keep it, then I'd suggest changing the default remote name to "origin" from "upstream", because it feels more natural and intuitive to me. Even though you document this in the README and I understand the reasoning - you can name your origin whatever you want + you can clone your fork and then add an upstream remote, but I wouldn't expect that to be very common practice.
Let's just use "default", that one doesn't have any charged meaning in the git world and it's pretty accurate, too. I'll also make the whole thing optional. I still have a slightly uncomfortable feeling about it, though I can't quite put it to words... Plus unlike with libvirt going one way or another won't quite lock us into that decision forever, so I'm more willing to just try stuff ;) -- Andrea Bolognani / Red Hat / Virtualization

On Tue, Sep 04, 2018 at 10:33:18AM +0200, Andrea Bolognani wrote:
On Tue, 2018-09-04 at 09:55 +0200, Erik Skultety wrote:
Initially, I wanted to point out that "revision" is probably not the best name [...]
I was thinking yesterday that perhaps it would be better to use '-g GITREVISION' here instead, to leave '-r' available for future extensions, eg. when/if I get around to adding support for dependencies between projects that could be used to mean 'recursive', as in: build this one project and also all those that depend on it, the same way CentOS CI does it. Does that sound reasonable?
Yep, I've been playing with the same thought too, so '-g' sounds fine to me.
[...]
def _action_build(self, hosts, projects, revision): + if revision is None: + raise Error("Missing git revision")
see above...as I said, I still don't see a reason for requiring ^this, if there truly is a compelling reason to keep it, then I'd suggest changing the default remote name to "origin" from "upstream", because it feels more natural and intuitive to me. Even though you document this in the README and I understand the reasoning - you can name your origin whatever you want + you can clone your fork and then add an upstream remote, but I wouldn't expect that to be very common practice.
Let's just use "default", that one doesn't have any charged meaning in the git world and it's pretty accurate, too.
Fair enough.
I'll also make the whole thing optional. I still have a slightly uncomfortable feeling about it, though I can't quite put it to words... Plus unlike with libvirt going one way or another won't quite lock us into that decision forever, so I'm more willing to just try stuff ;)
Reviewed-by: Erik Skultety <eskultet@redhat.com>

We'll soon to make it possible to build arbitrary branches from arbitrary git repositories with lcitool: sticking with the current scheme for on-disk storage would mean that we would create a separate git clone for each branch that was ever built this way, which is clearly extremely wasteful not to mention slow. To prevent that from happening we drop the branch name from the directory name, which makes it possible to have a single git clone per project and allows to quickly and cheaply switching repositories and branches. After dropping the branch name from the directory name, there is very little reason to keep it in the job name: on the CentOS CI environment we only ever build master, and with lcitool the users themselves provide the git configuration including the branch name, so it doesn't really provide any useful information in either case. Let's drop it from there as well. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .../playbooks/build/jobs/autotools-build-job.yml | 4 ++-- .../playbooks/build/jobs/autotools-check-job.yml | 4 ++-- .../playbooks/build/jobs/autotools-rpm-job.yml | 4 ++-- .../build/jobs/autotools-syntax-check-job.yml | 4 ++-- .../playbooks/build/jobs/generic-build-job.yml | 4 ++-- .../playbooks/build/jobs/generic-check-job.yml | 4 ++-- guests/playbooks/build/jobs/generic-rpm-job.yml | 4 ++-- .../build/jobs/generic-syntax-check-job.yml | 4 ++-- guests/playbooks/build/jobs/go-build-job.yml | 4 ++-- guests/playbooks/build/jobs/go-check-job.yml | 4 ++-- .../build/jobs/perl-modulebuild-build-job.yml | 4 ++-- .../build/jobs/perl-modulebuild-check-job.yml | 4 ++-- .../build/jobs/perl-modulebuild-rpm-job.yml | 4 ++-- guests/playbooks/build/jobs/prepare.yml | 8 ++++---- .../build/jobs/python-distutils-build-job.yml | 4 ++-- .../build/jobs/python-distutils-check-job.yml | 4 ++-- .../build/jobs/python-distutils-rpm-job.yml | 4 ++-- jobs/autotools.yaml | 16 ++++++++-------- jobs/generic.yaml | 16 ++++++++-------- jobs/go.yaml | 8 ++++---- jobs/perl-modulebuild.yaml | 12 ++++++------ jobs/python-distutils.yaml | 12 ++++++------ projects/libosinfo.yaml | 12 ++++++------ projects/libvirt-cim.yaml | 4 ++-- projects/libvirt-dbus.yaml | 8 ++++---- projects/libvirt-glib.yaml | 12 ++++++------ projects/libvirt-go-xml.yaml | 4 ++-- projects/libvirt-go.yaml | 4 ++-- projects/libvirt-perl.yaml | 6 +++--- projects/libvirt-python.yaml | 6 +++--- projects/libvirt-sandbox.yaml | 8 ++++---- projects/libvirt-tck.yaml | 6 +++--- projects/libvirt.yaml | 6 +++--- projects/osinfo-db-tools.yaml | 6 +++--- projects/osinfo-db.yaml | 6 +++--- projects/virt-manager.yaml | 8 ++++---- projects/virt-viewer.yaml | 12 ++++++------ 37 files changed, 122 insertions(+), 122 deletions(-) diff --git a/guests/playbooks/build/jobs/autotools-build-job.yml b/guests/playbooks/build/jobs/autotools-build-job.yml index bb621a1..70751bb 100644 --- a/guests/playbooks/build/jobs/autotools-build-job.yml +++ b/guests/playbooks/build/jobs/autotools-build-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-build{{ variant }}' +- name: '{{ name }}-build{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/autotools-check-job.yml b/guests/playbooks/build/jobs/autotools-check-job.yml index 50024ae..24a3ad4 100644 --- a/guests/playbooks/build/jobs/autotools-check-job.yml +++ b/guests/playbooks/build/jobs/autotools-check-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-check{{ variant }}' +- name: '{{ name }}-check{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/autotools-rpm-job.yml b/guests/playbooks/build/jobs/autotools-rpm-job.yml index c8babdf..1778211 100644 --- a/guests/playbooks/build/jobs/autotools-rpm-job.yml +++ b/guests/playbooks/build/jobs/autotools-rpm-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-rpm{{ variant }}' +- name: '{{ name }}-rpm{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/autotools-syntax-check-job.yml b/guests/playbooks/build/jobs/autotools-syntax-check-job.yml index bbbd240..e101c6d 100644 --- a/guests/playbooks/build/jobs/autotools-syntax-check-job.yml +++ b/guests/playbooks/build/jobs/autotools-syntax-check-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-syntax-check{{ variant }}' +- name: '{{ name }}-syntax-check{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/generic-build-job.yml b/guests/playbooks/build/jobs/generic-build-job.yml index 5519eee..b651952 100644 --- a/guests/playbooks/build/jobs/generic-build-job.yml +++ b/guests/playbooks/build/jobs/generic-build-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-build{{ variant }}' +- name: '{{ name }}-build{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/generic-check-job.yml b/guests/playbooks/build/jobs/generic-check-job.yml index 00fbce3..c133890 100644 --- a/guests/playbooks/build/jobs/generic-check-job.yml +++ b/guests/playbooks/build/jobs/generic-check-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-check{{ variant }}' +- name: '{{ name }}-check{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/generic-rpm-job.yml b/guests/playbooks/build/jobs/generic-rpm-job.yml index 1db4ea4..879d9f4 100644 --- a/guests/playbooks/build/jobs/generic-rpm-job.yml +++ b/guests/playbooks/build/jobs/generic-rpm-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-rpm{{ variant }}' +- name: '{{ name }}-rpm{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/generic-syntax-check-job.yml b/guests/playbooks/build/jobs/generic-syntax-check-job.yml index 72885f1..471cbf5 100644 --- a/guests/playbooks/build/jobs/generic-syntax-check-job.yml +++ b/guests/playbooks/build/jobs/generic-syntax-check-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-syntax-check{{ variant }}' +- name: '{{ name }}-syntax-check{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/go-build-job.yml b/guests/playbooks/build/jobs/go-build-job.yml index 8a3ebb9..5eb9de1 100644 --- a/guests/playbooks/build/jobs/go-build-job.yml +++ b/guests/playbooks/build/jobs/go-build-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-build{{ variant }}' +- name: '{{ name }}-build{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/go-check-job.yml b/guests/playbooks/build/jobs/go-check-job.yml index dda7998..29f3c53 100644 --- a/guests/playbooks/build/jobs/go-check-job.yml +++ b/guests/playbooks/build/jobs/go-check-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-check{{ variant }}' +- name: '{{ name }}-check{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/perl-modulebuild-build-job.yml b/guests/playbooks/build/jobs/perl-modulebuild-build-job.yml index 030e713..15a1089 100644 --- a/guests/playbooks/build/jobs/perl-modulebuild-build-job.yml +++ b/guests/playbooks/build/jobs/perl-modulebuild-build-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-build{{ variant }}' +- name: '{{ name }}-build{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/perl-modulebuild-check-job.yml b/guests/playbooks/build/jobs/perl-modulebuild-check-job.yml index 165e868..5c8ab1b 100644 --- a/guests/playbooks/build/jobs/perl-modulebuild-check-job.yml +++ b/guests/playbooks/build/jobs/perl-modulebuild-check-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-check{{ variant }}' +- name: '{{ name }}-check{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml b/guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml index 7a2ddc9..dad672c 100644 --- a/guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml +++ b/guests/playbooks/build/jobs/perl-modulebuild-rpm-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-rpm{{ variant }}' +- name: '{{ name }}-rpm{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/prepare.yml b/guests/playbooks/build/jobs/prepare.yml index 0b22ac5..01e667d 100644 --- a/guests/playbooks/build/jobs/prepare.yml +++ b/guests/playbooks/build/jobs/prepare.yml @@ -1,17 +1,17 @@ --- -- name: '{{ name }}-{{ branch }}-prepare{{ variant }}' +- name: '{{ name }}-prepare{{ variant }}' git: repo: '{{ git_url }}' version: '{{ branch }}' - dest: '{{ name }}-{{ branch }}{{ variant }}' + dest: '{{ name }}{{ variant }}' force: yes when: - inventory_hostname in machines -- name: '{{ name }}-{{ branch }}-prepare{{ variant }}' +- name: '{{ name }}-prepare{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} git clean -xdf git submodule update --init diff --git a/guests/playbooks/build/jobs/python-distutils-build-job.yml b/guests/playbooks/build/jobs/python-distutils-build-job.yml index c077015..711edc2 100644 --- a/guests/playbooks/build/jobs/python-distutils-build-job.yml +++ b/guests/playbooks/build/jobs/python-distutils-build-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-build{{ variant }}' +- name: '{{ name }}-build{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/python-distutils-check-job.yml b/guests/playbooks/build/jobs/python-distutils-check-job.yml index 318feaf..4f36868 100644 --- a/guests/playbooks/build/jobs/python-distutils-check-job.yml +++ b/guests/playbooks/build/jobs/python-distutils-check-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-check{{ variant }}' +- name: '{{ name }}-check{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/guests/playbooks/build/jobs/python-distutils-rpm-job.yml b/guests/playbooks/build/jobs/python-distutils-rpm-job.yml index 4ee418f..bae2b9b 100644 --- a/guests/playbooks/build/jobs/python-distutils-rpm-job.yml +++ b/guests/playbooks/build/jobs/python-distutils-rpm-job.yml @@ -1,8 +1,8 @@ --- -- name: '{{ name }}-{{ branch }}-rpm{{ variant }}' +- name: '{{ name }}-rpm{{ variant }}' shell: | set -e - cd {{ name }}-{{ branch }}{{ variant }} + cd {{ name }}{{ variant }} {{ global_env }} {{ local_env }} diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml index 4232d0e..96e21d7 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -1,10 +1,10 @@ - job-template: id: autotools-build-job - name: '{name}-{branch}-build{variant}' + name: '{name}-build{variant}' project-type: matrix description: '{title} Build' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -54,10 +54,10 @@ - job-template: id: autotools-syntax-check-job - name: '{name}-{branch}-syntax-check{variant}' + name: '{name}-syntax-check{variant}' project-type: matrix description: '{title} Syntax Check' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -93,10 +93,10 @@ - job-template: id: autotools-check-job - name: '{name}-{branch}-check{variant}' + name: '{name}-check{variant}' project-type: matrix description: '{title} Check' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -136,10 +136,10 @@ - job-template: id: autotools-rpm-job - name: '{name}-{branch}-rpm{variant}' + name: '{name}-rpm{variant}' project-type: matrix description: '{title} RPM' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true diff --git a/jobs/generic.yaml b/jobs/generic.yaml index 805b1d6..3ab7534 100644 --- a/jobs/generic.yaml +++ b/jobs/generic.yaml @@ -1,10 +1,10 @@ - job-template: id: generic-build-job - name: '{name}-{branch}-build{variant}' + name: '{name}-build{variant}' project-type: matrix description: '{title} Build' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -50,10 +50,10 @@ - job-template: id: generic-syntax-check-job - name: '{name}-{branch}-syntax-check{variant}' + name: '{name}-syntax-check{variant}' project-type: matrix description: '{title} Syntax Check' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -88,10 +88,10 @@ - job-template: id: generic-check-job - name: '{name}-{branch}-check{variant}' + name: '{name}-check{variant}' project-type: matrix description: '{title} Check' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -126,10 +126,10 @@ - job-template: id: generic-rpm-job - name: '{name}-{branch}-rpm{variant}' + name: '{name}-rpm{variant}' project-type: matrix description: '{title} RPM' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true diff --git a/jobs/go.yaml b/jobs/go.yaml index b460658..308bb48 100644 --- a/jobs/go.yaml +++ b/jobs/go.yaml @@ -1,10 +1,10 @@ - job-template: id: go-build-job - name: '{name}-{branch}-build{variant}' + name: '{name}-build{variant}' project-type: matrix description: '{title} Build' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -50,10 +50,10 @@ - job-template: id: go-check-job - name: '{name}-{branch}-check{variant}' + name: '{name}-check{variant}' project-type: matrix description: '{title} Check' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml index 01247a3..8170ccd 100644 --- a/jobs/perl-modulebuild.yaml +++ b/jobs/perl-modulebuild.yaml @@ -1,10 +1,10 @@ - job-template: id: perl-modulebuild-build-job - name: '{name}-{branch}-build{variant}' + name: '{name}-build{variant}' project-type: matrix description: '{title} Build' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -53,10 +53,10 @@ - job-template: id: perl-modulebuild-check-job - name: '{name}-{branch}-check{variant}' + name: '{name}-check{variant}' project-type: matrix description: '{title} Check' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -91,10 +91,10 @@ - job-template: id: perl-modulebuild-rpm-job - name: '{name}-{branch}-rpm{variant}' + name: '{name}-rpm{variant}' project-type: matrix description: '{title} RPM' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index 1227b8c..be9f0ce 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -1,10 +1,10 @@ - job-template: id: python-distutils-build-job - name: '{name}-{branch}-build{variant}' + name: '{name}-build{variant}' project-type: matrix description: '{title} Build' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -53,10 +53,10 @@ - job-template: id: python-distutils-check-job - name: '{name}-{branch}-check{variant}' + name: '{name}-check{variant}' project-type: matrix description: '{title} Check' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true @@ -91,10 +91,10 @@ - job-template: id: python-distutils-rpm-job - name: '{name}-{branch}-rpm{variant}' + name: '{name}-rpm{variant}' project-type: matrix description: '{title} RPM' - workspace: '{name}-{branch}{variant}' + workspace: '{name}{variant}' child-workspace: '.' block-downstream: true block-upstream: true diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml index 55a4817..167b720 100644 --- a/projects/libosinfo.yaml +++ b/projects/libosinfo.yaml @@ -7,22 +7,22 @@ git_url: https://gitlab.com/libosinfo/libosinfo.git jobs: - autotools-build-job: - parent_jobs: 'osinfo-db-master-build' + parent_jobs: 'osinfo-db-build' - autotools-syntax-check-job: - parent_jobs: 'libosinfo-master-build' + parent_jobs: 'libosinfo-build' - autotools-check-job: - parent_jobs: 'libosinfo-master-syntax-check' + parent_jobs: 'libosinfo-syntax-check' - autotools-rpm-job: - parent_jobs: 'libosinfo-master-check' + parent_jobs: 'libosinfo-check' machines: '{rpm_machines}' - autotools-build-job: - parent_jobs: 'osinfo-db-tools-master-build-mingw32' + parent_jobs: 'osinfo-db-tools-build-mingw32' variant: -mingw32 local_env: '{mingw32_local_env}' autogen_args: '{mingw32_autogen_args}' machines: '{mingw_machines}' - autotools-build-job: - parent_jobs: 'osinfo-db-tools-master-build-mingw64' + parent_jobs: 'osinfo-db-tools-build-mingw64' variant: -mingw64 local_env: '{mingw64_local_env}' autogen_args: '{mingw64_autogen_args}' diff --git a/projects/libvirt-cim.yaml b/projects/libvirt-cim.yaml index 6d524df..6657dc4 100644 --- a/projects/libvirt-cim.yaml +++ b/projects/libvirt-cim.yaml @@ -7,6 +7,6 @@ git_url: https://github.com/libvirt/libvirt-cim.git jobs: - autotools-build-job: - parent_jobs: 'libvirt-master-build' + parent_jobs: 'libvirt-build' - autotools-rpm-job: - parent_jobs: 'libvirt-cim-master-build' + parent_jobs: 'libvirt-cim-build' diff --git a/projects/libvirt-dbus.yaml b/projects/libvirt-dbus.yaml index 5689345..ff088e7 100644 --- a/projects/libvirt-dbus.yaml +++ b/projects/libvirt-dbus.yaml @@ -15,9 +15,9 @@ git_url: https://github.com/libvirt/libvirt-dbus.git jobs: - autotools-build-job: - parent_jobs: 'libvirt-glib-master-build' + parent_jobs: 'libvirt-glib-build' - autotools-syntax-check-job: - parent_jobs: 'libvirt-dbus-master-build' + parent_jobs: 'libvirt-dbus-build' # CentOS 7 doesn't include Python 3 and the version of pyflakes # in FreeBSD CURRENT is too new to be used by flake8 machines: @@ -28,7 +28,7 @@ - libvirt-freebsd-10 - libvirt-freebsd-11 - autotools-check-job: - parent_jobs: 'libvirt-dbus-master-syntax-check' + parent_jobs: 'libvirt-dbus-syntax-check' # CentOS 7 doesn't include Python 3 and the version in Ubuntu # 16.04 is too old machines: @@ -39,5 +39,5 @@ - libvirt-freebsd-10 - libvirt-freebsd-11 - autotools-rpm-job: - parent_jobs: 'libvirt-dbus-master-check' + parent_jobs: 'libvirt-dbus-check' machines: '{rpm_machines}' diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml index 993024a..02ba50f 100644 --- a/projects/libvirt-glib.yaml +++ b/projects/libvirt-glib.yaml @@ -7,23 +7,23 @@ git_url: https://github.com/libvirt/libvirt-glib.git jobs: - autotools-build-job: - parent_jobs: 'libvirt-master-build' + parent_jobs: 'libvirt-build' autogen_args: --enable-gtk-doc - autotools-syntax-check-job: - parent_jobs: 'libvirt-glib-master-build' + parent_jobs: 'libvirt-glib-build' - autotools-check-job: - parent_jobs: 'libvirt-glib-master-syntax-check' + parent_jobs: 'libvirt-glib-syntax-check' - autotools-rpm-job: - parent_jobs: 'libvirt-glib-master-check' + parent_jobs: 'libvirt-glib-check' machines: '{rpm_machines}' - autotools-build-job: - parent_jobs: 'libvirt-master-build-mingw32' + parent_jobs: 'libvirt-build-mingw32' variant: -mingw32 local_env: '{mingw32_local_env}' autogen_args: '{mingw32_autogen_args}' machines: '{mingw_machines}' - autotools-build-job: - parent_jobs: 'libvirt-master-build-mingw64' + parent_jobs: 'libvirt-build-mingw64' variant: -mingw64 local_env: '{mingw64_local_env}' autogen_args: '{mingw64_autogen_args}' diff --git a/projects/libvirt-go-xml.yaml b/projects/libvirt-go-xml.yaml index 7e6e090..4da955b 100644 --- a/projects/libvirt-go-xml.yaml +++ b/projects/libvirt-go-xml.yaml @@ -7,8 +7,8 @@ git_url: https://github.com/libvirt/libvirt-go-xml.git jobs: - go-build-job: - parent_jobs: 'libvirt-master-build' + parent_jobs: 'libvirt-build' - go-check-job: - parent_jobs: 'libvirt-go-xml-master-build' + parent_jobs: 'libvirt-go-xml-build' local_env: | export TEST_ARGS="-tags xmlroundtrip" diff --git a/projects/libvirt-go.yaml b/projects/libvirt-go.yaml index d90339a..11ad037 100644 --- a/projects/libvirt-go.yaml +++ b/projects/libvirt-go.yaml @@ -7,8 +7,8 @@ git_url: https://github.com/libvirt/libvirt-go.git jobs: - go-build-job: - parent_jobs: 'libvirt-master-build' + parent_jobs: 'libvirt-build' - go-check-job: - parent_jobs: 'libvirt-go-master-build' + parent_jobs: 'libvirt-go-build' local_env: | export TEST_ARGS="-tags api" diff --git a/projects/libvirt-perl.yaml b/projects/libvirt-perl.yaml index dbb6caf..c76b319 100644 --- a/projects/libvirt-perl.yaml +++ b/projects/libvirt-perl.yaml @@ -7,13 +7,13 @@ git_url: https://github.com/libvirt/libvirt-perl.git jobs: - perl-modulebuild-build-job: - parent_jobs: 'libvirt-master-build' + parent_jobs: 'libvirt-build' local_env: | export TEST_MAINTAINER=1 - perl-modulebuild-check-job: - parent_jobs: 'libvirt-perl-master-build' + parent_jobs: 'libvirt-perl-build' local_env: | export TEST_MAINTAINER=1 - perl-modulebuild-rpm-job: - parent_jobs: 'libvirt-perl-master-check' + parent_jobs: 'libvirt-perl-check' machines: '{rpm_machines}' diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml index 05eea41..044010c 100644 --- a/projects/libvirt-python.yaml +++ b/projects/libvirt-python.yaml @@ -7,9 +7,9 @@ git_url: https://github.com/libvirt/libvirt-python.git jobs: - python-distutils-build-job: - parent_jobs: 'libvirt-master-build' + parent_jobs: 'libvirt-build' - python-distutils-check-job: - parent_jobs: 'libvirt-python-master-build' + parent_jobs: 'libvirt-python-build' - python-distutils-rpm-job: - parent_jobs: 'libvirt-python-master-check' + parent_jobs: 'libvirt-python-check' machines: '{rpm_machines}' diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml index 0831896..418a751 100644 --- a/projects/libvirt-sandbox.yaml +++ b/projects/libvirt-sandbox.yaml @@ -15,14 +15,14 @@ git_url: https://github.com/libvirt/libvirt-sandbox.git jobs: - autotools-build-job: - parent_jobs: 'libvirt-glib-master-build' + parent_jobs: 'libvirt-glib-build' autogen_args: --enable-gtk-doc - autotools-syntax-check-job: - parent_jobs: 'libvirt-sandbox-master-build' + parent_jobs: 'libvirt-sandbox-build' - autotools-check-job: - parent_jobs: 'libvirt-sandbox-master-syntax-check' + parent_jobs: 'libvirt-sandbox-syntax-check' - autotools-rpm-job: - parent_jobs: 'libvirt-sandbox-master-check' + parent_jobs: 'libvirt-sandbox-check' machines: - libvirt-fedora-27 - libvirt-fedora-28 diff --git a/projects/libvirt-tck.yaml b/projects/libvirt-tck.yaml index 3c8adfd..61174f9 100644 --- a/projects/libvirt-tck.yaml +++ b/projects/libvirt-tck.yaml @@ -16,11 +16,11 @@ git_url: https://github.com/libvirt/libvirt-tck.git jobs: - perl-modulebuild-build-job: - parent_jobs: 'libvirt-perl-master-build' + parent_jobs: 'libvirt-perl-build' - perl-modulebuild-check-job: - parent_jobs: 'libvirt-tck-master-build' + parent_jobs: 'libvirt-tck-build' - perl-modulebuild-rpm-job: - parent_jobs: 'libvirt-tck-master-check' + parent_jobs: 'libvirt-tck-check' machines: - libvirt-fedora-27 - libvirt-fedora-28 diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml index e9db7cb..9feeb07 100644 --- a/projects/libvirt.yaml +++ b/projects/libvirt.yaml @@ -9,7 +9,7 @@ - autotools-build-job: parent_jobs: - autotools-syntax-check-job: - parent_jobs: 'libvirt-master-build' + parent_jobs: 'libvirt-build' # We limit syntax-check to Linux platforms because it calls some # commands with more arguments than FreeBSD supports machines: @@ -20,7 +20,7 @@ - libvirt-fedora-28 - libvirt-fedora-rawhide - autotools-check-job: - parent_jobs: 'libvirt-master-syntax-check' + parent_jobs: 'libvirt-syntax-check' local_env: | # gnulib's test-poll is broken on FreeBSD, so disable expensive # tests (which include gnulib's test suite) until it's fixed @@ -29,7 +29,7 @@ fi export VIR_TEST_DEBUG=2 - autotools-rpm-job: - parent_jobs: 'libvirt-master-check' + parent_jobs: 'libvirt-check' machines: '{rpm_machines}' - autotools-build-job: parent_jobs: diff --git a/projects/osinfo-db-tools.yaml b/projects/osinfo-db-tools.yaml index bcf9e0a..2ea08fd 100644 --- a/projects/osinfo-db-tools.yaml +++ b/projects/osinfo-db-tools.yaml @@ -9,11 +9,11 @@ - autotools-build-job: parent_jobs: - autotools-syntax-check-job: - parent_jobs: 'osinfo-db-tools-master-build' + parent_jobs: 'osinfo-db-tools-build' - autotools-check-job: - parent_jobs: 'osinfo-db-tools-master-syntax-check' + parent_jobs: 'osinfo-db-tools-syntax-check' - autotools-rpm-job: - parent_jobs: 'osinfo-db-tools-master-check' + parent_jobs: 'osinfo-db-tools-check' machines: '{rpm_machines}' - autotools-build-job: parent_jobs: diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml index 185d943..3c044e8 100644 --- a/projects/osinfo-db.yaml +++ b/projects/osinfo-db.yaml @@ -7,16 +7,16 @@ git_url: https://gitlab.com/libosinfo/osinfo-db.git jobs: - generic-build-job: - parent_jobs: 'osinfo-db-tools-master-build' + parent_jobs: 'osinfo-db-tools-build' command: | $MAKE all $MAKE install OSINFO_DB_TARGET="--system" - generic-check-job: - parent_jobs: 'osinfo-db-master-build' + parent_jobs: 'osinfo-db-build' command: | $MAKE check - generic-rpm-job: - parent_jobs: 'osinfo-db-master-check' + parent_jobs: 'osinfo-db-check' machines: '{rpm_machines}' command: | {strip_buildrequires} diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml index f7929d6..cae0f31 100644 --- a/projects/virt-manager.yaml +++ b/projects/virt-manager.yaml @@ -17,12 +17,12 @@ jobs: - python-distutils-build-job: parent_jobs: - - 'libvirt-python-master-build' - - 'libosinfo-master-build' + - 'libvirt-python-build' + - 'libosinfo-build' command_pre_build: | $PYTHON ./setup.py configure --prefix=$VIRT_PREFIX - python-distutils-check-job: - parent_jobs: 'virt-manager-master-build' + parent_jobs: 'virt-manager-build' # 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 @@ -32,7 +32,7 @@ - libvirt-fedora-28 - libvirt-fedora-rawhide - python-distutils-rpm-job: - parent_jobs: 'virt-manager-master-check' + parent_jobs: 'virt-manager-check' machines: - libvirt-fedora-27 - libvirt-fedora-28 diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml index 884cf12..4eee446 100644 --- a/projects/virt-viewer.yaml +++ b/projects/virt-viewer.yaml @@ -7,26 +7,26 @@ git_url: https://pagure.io/virt-viewer.git jobs: - autotools-build-job: - parent_jobs: 'libvirt-glib-master-build' + parent_jobs: 'libvirt-glib-build' - autotools-syntax-check-job: - parent_jobs: 'virt-viewer-master-build' + parent_jobs: 'virt-viewer-build' - autotools-check-job: - parent_jobs: 'virt-viewer-master-syntax-check' + parent_jobs: 'virt-viewer-syntax-check' - autotools-rpm-job: - parent_jobs: 'virt-viewer-master-check' + parent_jobs: 'virt-viewer-check' # 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 - autotools-build-job: - parent_jobs: 'libvirt-glib-master-build-mingw32' + parent_jobs: 'libvirt-glib-build-mingw32' variant: -mingw32 local_env: '{mingw32_local_env}' autogen_args: '{mingw32_autogen_args}' machines: '{mingw_machines}' - autotools-build-job: - parent_jobs: 'libvirt-glib-master-build-mingw64' + parent_jobs: 'libvirt-glib-build-mingw64' variant: -mingw64 local_env: '{mingw64_local_env}' autogen_args: '{mingw64_autogen_args}' -- 2.17.1

On Wed, Aug 29, 2018 at 05:08:59PM +0200, Andrea Bolognani wrote:
We'll soon to make it possible to build arbitrary branches from arbitrary git repositories with lcitool: sticking with the current scheme for on-disk storage would mean that we would create a separate git clone for each branch that was ever built this way, which is clearly extremely wasteful not to mention slow. To prevent that from happening we drop the branch name from the directory name, which makes it possible to have a single git clone per project and allows to quickly and cheaply switching repositories and branches.
After dropping the branch name from the directory name, there is very little reason to keep it in the job name: on the CentOS CI environment we only ever build master, and with lcitool the users themselves provide the git configuration including the branch name, so it doesn't really provide any useful information in either case. Let's drop it from there as well.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

We never build from any other branch on the CentOS CI environment, so treating this as a configurable parameter is pointless and will only get in the way of making further changes. 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 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml index 96e21d7..96e5edf 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -22,7 +22,7 @@ - git: url: '{git_url}' branches: - - origin/{branch} + - origin/master clean: after: true skip-tag: true diff --git a/jobs/generic.yaml b/jobs/generic.yaml index 3ab7534..fb7f866 100644 --- a/jobs/generic.yaml +++ b/jobs/generic.yaml @@ -22,7 +22,7 @@ - git: url: '{git_url}' branches: - - origin/{branch} + - origin/master clean: after: true skip-tag: true diff --git a/jobs/go.yaml b/jobs/go.yaml index 308bb48..56ad11f 100644 --- a/jobs/go.yaml +++ b/jobs/go.yaml @@ -22,7 +22,7 @@ - git: url: '{git_url}' branches: - - origin/{branch} + - origin/master clean: after: true skip-tag: true diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml index 8170ccd..af041c2 100644 --- a/jobs/perl-modulebuild.yaml +++ b/jobs/perl-modulebuild.yaml @@ -22,7 +22,7 @@ - git: url: '{git_url}' branches: - - origin/{branch} + - origin/master clean: after: true skip-tag: true diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index be9f0ce..fe85c98 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -22,7 +22,7 @@ - git: url: '{git_url}' branches: - - origin/{branch} + - origin/master clean: after: true skip-tag: true -- 2.17.1

On Wed, Aug 29, 2018 at 05:09:00PM +0200, Andrea Bolognani wrote:
We never build from any other branch on the CentOS CI environment, so treating this as a configurable parameter is pointless and will only get in the way of making further changes.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

This makes the build process use the value provided by the user through lcitool instead of the default. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/jobs/prepare.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guests/playbooks/build/jobs/prepare.yml b/guests/playbooks/build/jobs/prepare.yml index 01e667d..7782c0f 100644 --- a/guests/playbooks/build/jobs/prepare.yml +++ b/guests/playbooks/build/jobs/prepare.yml @@ -2,7 +2,7 @@ - name: '{{ name }}-prepare{{ variant }}' git: repo: '{{ git_url }}' - version: '{{ branch }}' + version: '{{ git_branch }}' dest: '{{ name }}{{ variant }}' force: yes when: -- 2.17.1

On Wed, Aug 29, 2018 at 05:09:01PM +0200, Andrea Bolognani wrote:
This makes the build process use the value provided by the user through lcitool instead of the default.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

It's no longer used anywhere. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/jobs/defaults.yml | 1 - jobs/defaults.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml index 6a0d888..c07475c 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 diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 8f11860..872dea0 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -1,7 +1,6 @@ - defaults: name: global - branch: master variant: '' node: libvirt all_machines: -- 2.17.1

On Wed, Aug 29, 2018 at 05:09:02PM +0200, Andrea Bolognani wrote:
It's no longer used anywhere.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Out of the box, it contains the upstream repository for all projects; additionally, the user will be able to store information about their own repositories, making it possible to test-build in-progress branches before submitting the code upstream. Despite all the pieces being now in place for us to get rid of the per-project "git_url" variable entirely, we can't actually do that because Jenkins Job Builder, unlike Ansible, doesn't support dictionary access with other variables being used as keys. That's fairly okay, though, because the Jenkins part is less dynamic than the Ansible one anyway. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/jobs/defaults.yml | 31 +++++++++++++++++++ guests/playbooks/build/projects/libosinfo.yml | 2 +- .../playbooks/build/projects/libvirt-cim.yml | 2 +- .../playbooks/build/projects/libvirt-dbus.yml | 2 +- .../playbooks/build/projects/libvirt-glib.yml | 2 +- .../build/projects/libvirt-go-xml.yml | 2 +- .../playbooks/build/projects/libvirt-go.yml | 2 +- .../playbooks/build/projects/libvirt-perl.yml | 2 +- .../build/projects/libvirt-python.yml | 2 +- .../build/projects/libvirt-sandbox.yml | 2 +- .../playbooks/build/projects/libvirt-tck.yml | 2 +- guests/playbooks/build/projects/libvirt.yml | 2 +- .../build/projects/osinfo-db-tools.yml | 2 +- guests/playbooks/build/projects/osinfo-db.yml | 2 +- .../playbooks/build/projects/virt-manager.yml | 2 +- .../playbooks/build/projects/virt-viewer.yml | 2 +- jobs/defaults.yaml | 31 +++++++++++++++++++ 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 +- 32 files changed, 92 insertions(+), 30 deletions(-) diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml index c07475c..b8fb6b7 100644 --- a/guests/playbooks/build/jobs/defaults.yml +++ b/guests/playbooks/build/jobs/defaults.yml @@ -40,3 +40,34 @@ mingw64_local_env: | 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 +git_urls: + libosinfo: + upstream: https://gitlab.com/libosinfo/libosinfo.git + libvirt-cim: + upstream: https://github.com/libvirt/libvirt-cim.git + libvirt-dbus: + upstream: https://github.com/libvirt/libvirt-dbus.git + libvirt-glib: + upstream: https://github.com/libvirt/libvirt-glib.git + libvirt-go-xml: + upstream: https://github.com/libvirt/libvirt-go-xml.git + libvirt-go: + upstream: https://github.com/libvirt/libvirt-go.git + libvirt-perl: + upstream: https://github.com/libvirt/libvirt-perl.git + libvirt-python: + upstream: https://github.com/libvirt/libvirt-python.git + libvirt-sandbox: + upstream: https://github.com/libvirt/libvirt-sandbox.git + libvirt-tck: + upstream: https://github.com/libvirt/libvirt-tck.git + libvirt: + upstream: https://github.com/libvirt/libvirt.git + osinfo-db-tools: + upstream: https://gitlab.com/libosinfo/osinfo-db-tools.git + osinfo-db: + upstream: https://gitlab.com/libosinfo/osinfo-db.git + virt-manager: + upstream: https://github.com/virt-manager/virt-manager.git + virt-viewer: + upstream: https://pagure.io/virt-viewer.git diff --git a/guests/playbooks/build/projects/libosinfo.yml b/guests/playbooks/build/projects/libosinfo.yml index c29053b..9082c33 100644 --- a/guests/playbooks/build/projects/libosinfo.yml +++ b/guests/playbooks/build/projects/libosinfo.yml @@ -3,7 +3,7 @@ name: libosinfo machines: '{{ all_machines }}' archive_format: gz - git_url: https://gitlab.com/libosinfo/libosinfo.git + git_url: '{{ git_urls["libosinfo"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-cim.yml b/guests/playbooks/build/projects/libvirt-cim.yml index f959bf6..a5cc82f 100644 --- a/guests/playbooks/build/projects/libvirt-cim.yml +++ b/guests/playbooks/build/projects/libvirt-cim.yml @@ -3,7 +3,7 @@ name: libvirt-cim machines: '{{ rpm_machines }}' archive_format: gz - git_url: https://github.com/libvirt/libvirt-cim.git + git_url: '{{ git_urls["libvirt-cim"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-dbus.yml b/guests/playbooks/build/projects/libvirt-dbus.yml index d9f5d4a..857c82a 100644 --- a/guests/playbooks/build/projects/libvirt-dbus.yml +++ b/guests/playbooks/build/projects/libvirt-dbus.yml @@ -15,7 +15,7 @@ - libvirt-ubuntu-16 - libvirt-ubuntu-18 archive_format: xz - git_url: https://github.com/libvirt/libvirt-dbus.git + git_url: '{{ git_urls["libvirt-dbus"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-glib.yml b/guests/playbooks/build/projects/libvirt-glib.yml index 0d8de9d..78a40bf 100644 --- a/guests/playbooks/build/projects/libvirt-glib.yml +++ b/guests/playbooks/build/projects/libvirt-glib.yml @@ -3,7 +3,7 @@ name: libvirt-glib machines: '{{ all_machines }}' archive_format: gz - git_url: https://github.com/libvirt/libvirt-glib.git + git_url: '{{ git_urls["libvirt-glib"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-go-xml.yml b/guests/playbooks/build/projects/libvirt-go-xml.yml index 5dc86e7..e5f7b12 100644 --- a/guests/playbooks/build/projects/libvirt-go-xml.yml +++ b/guests/playbooks/build/projects/libvirt-go-xml.yml @@ -3,7 +3,7 @@ name: libvirt-go-xml machines: '{{ all_machines }}' archive_format: gz - git_url: https://github.com/libvirt/libvirt-go-xml.git + git_url: '{{ git_urls["libvirt-go-xml"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/go-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-go.yml b/guests/playbooks/build/projects/libvirt-go.yml index 9316ef1..78f9856 100644 --- a/guests/playbooks/build/projects/libvirt-go.yml +++ b/guests/playbooks/build/projects/libvirt-go.yml @@ -3,7 +3,7 @@ name: libvirt-go machines: '{{ all_machines }}' archive_format: gz - git_url: https://github.com/libvirt/libvirt-go.git + git_url: '{{ git_urls["libvirt-go"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/go-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-perl.yml b/guests/playbooks/build/projects/libvirt-perl.yml index 6cb15bd..f90a8ed 100644 --- a/guests/playbooks/build/projects/libvirt-perl.yml +++ b/guests/playbooks/build/projects/libvirt-perl.yml @@ -3,7 +3,7 @@ name: libvirt-perl machines: '{{ all_machines }}' archive_format: gz - git_url: https://github.com/libvirt/libvirt-perl.git + git_url: '{{ git_urls["libvirt-perl"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/perl-modulebuild-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-python.yml b/guests/playbooks/build/projects/libvirt-python.yml index f2c39be..ba67f1b 100644 --- a/guests/playbooks/build/projects/libvirt-python.yml +++ b/guests/playbooks/build/projects/libvirt-python.yml @@ -3,7 +3,7 @@ name: libvirt-python machines: '{{ all_machines }}' archive_format: gz - git_url: https://github.com/libvirt/libvirt-python.git + git_url: '{{ git_urls["libvirt-python"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/python-distutils-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-sandbox.yml b/guests/playbooks/build/projects/libvirt-sandbox.yml index 411cfc7..e4021c4 100644 --- a/guests/playbooks/build/projects/libvirt-sandbox.yml +++ b/guests/playbooks/build/projects/libvirt-sandbox.yml @@ -14,7 +14,7 @@ - libvirt-ubuntu-16 - libvirt-ubuntu-18 archive_format: gz - git_url: https://github.com/libvirt/libvirt-sandbox.git + git_url: '{{ git_urls["libvirt-sandbox"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-tck.yml b/guests/playbooks/build/projects/libvirt-tck.yml index fa16d26..06d0c2a 100644 --- a/guests/playbooks/build/projects/libvirt-tck.yml +++ b/guests/playbooks/build/projects/libvirt-tck.yml @@ -14,7 +14,7 @@ - libvirt-ubuntu-16 - libvirt-ubuntu-18 archive_format: gz - git_url: https://github.com/libvirt/libvirt-tck.git + git_url: '{{ git_urls["libvirt-tck"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/perl-modulebuild-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt.yml b/guests/playbooks/build/projects/libvirt.yml index bb3e53f..1c5bdd2 100644 --- a/guests/playbooks/build/projects/libvirt.yml +++ b/guests/playbooks/build/projects/libvirt.yml @@ -3,7 +3,7 @@ name: libvirt machines: '{{ all_machines }}' archive_format: xz - git_url: https://github.com/libvirt/libvirt.git + git_url: '{{ git_urls["libvirt"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/osinfo-db-tools.yml b/guests/playbooks/build/projects/osinfo-db-tools.yml index a4b7c0e..26aa00a 100644 --- a/guests/playbooks/build/projects/osinfo-db-tools.yml +++ b/guests/playbooks/build/projects/osinfo-db-tools.yml @@ -3,7 +3,7 @@ name: osinfo-db-tools machines: '{{ all_machines }}' archive_format: gz - git_url: https://gitlab.com/libosinfo/osinfo-db-tools.git + git_url: '{{ git_urls["osinfo-db-tools"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/osinfo-db.yml b/guests/playbooks/build/projects/osinfo-db.yml index 97bc31d..a199040 100644 --- a/guests/playbooks/build/projects/osinfo-db.yml +++ b/guests/playbooks/build/projects/osinfo-db.yml @@ -3,7 +3,7 @@ name: osinfo-db machines: '{{ all_machines }}' archive_format: xz - git_url: https://gitlab.com/libosinfo/osinfo-db.git + git_url: '{{ git_urls["osinfo-db"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/generic-build-job.yml' diff --git a/guests/playbooks/build/projects/virt-manager.yml b/guests/playbooks/build/projects/virt-manager.yml index fcd4fa4..a648ea1 100644 --- a/guests/playbooks/build/projects/virt-manager.yml +++ b/guests/playbooks/build/projects/virt-manager.yml @@ -15,7 +15,7 @@ - libvirt-freebsd-current - libvirt-ubuntu-18 archive_format: gz - git_url: https://github.com/virt-manager/virt-manager.git + git_url: '{{ git_urls["virt-manager"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/python-distutils-build-job.yml' diff --git a/guests/playbooks/build/projects/virt-viewer.yml b/guests/playbooks/build/projects/virt-viewer.yml index 04af2b3..da1a562 100644 --- a/guests/playbooks/build/projects/virt-viewer.yml +++ b/guests/playbooks/build/projects/virt-viewer.yml @@ -3,7 +3,7 @@ name: virt-viewer machines: '{{ all_machines }}' archive_format: gz - git_url: https://pagure.io/virt-viewer.git + git_url: '{{ git_urls["virt-viewer"]["upstream"] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index 872dea0..58f8801 100644 --- a/jobs/defaults.yaml +++ b/jobs/defaults.yaml @@ -39,4 +39,35 @@ 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 + git_urls: + libosinfo: + upstream: https://gitlab.com/libosinfo/libosinfo.git + libvirt-cim: + upstream: https://github.com/libvirt/libvirt-cim.git + libvirt-dbus: + upstream: https://github.com/libvirt/libvirt-dbus.git + libvirt-glib: + upstream: https://github.com/libvirt/libvirt-glib.git + libvirt-go-xml: + upstream: https://github.com/libvirt/libvirt-go-xml.git + libvirt-go: + upstream: https://github.com/libvirt/libvirt-go.git + libvirt-perl: + upstream: https://github.com/libvirt/libvirt-perl.git + libvirt-python: + upstream: https://github.com/libvirt/libvirt-python.git + libvirt-sandbox: + upstream: https://github.com/libvirt/libvirt-sandbox.git + libvirt-tck: + upstream: https://github.com/libvirt/libvirt-tck.git + libvirt: + upstream: https://github.com/libvirt/libvirt.git + osinfo-db-tools: + upstream: https://gitlab.com/libosinfo/osinfo-db-tools.git + osinfo-db: + upstream: https://gitlab.com/libosinfo/osinfo-db.git + virt-manager: + upstream: https://github.com/virt-manager/virt-manager.git + virt-viewer: + upstream: https://pagure.io/virt-viewer.git spam: ymankad@redhat.com libvirt-ci@redhat.com diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml index 167b720..29dfe0a 100644 --- a/projects/libosinfo.yaml +++ b/projects/libosinfo.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: libosinfo archive_format: gz - git_url: https://gitlab.com/libosinfo/libosinfo.git + git_url: '{git_urls[libosinfo][upstream]}' jobs: - autotools-build-job: parent_jobs: 'osinfo-db-build' diff --git a/projects/libvirt-cim.yaml b/projects/libvirt-cim.yaml index 6657dc4..680b5c0 100644 --- a/projects/libvirt-cim.yaml +++ b/projects/libvirt-cim.yaml @@ -4,7 +4,7 @@ machines: '{rpm_machines}' title: libvirt CIM archive_format: gz - git_url: https://github.com/libvirt/libvirt-cim.git + git_url: '{git_urls[libvirt-cim][upstream]}' jobs: - autotools-build-job: parent_jobs: 'libvirt-build' diff --git a/projects/libvirt-dbus.yaml b/projects/libvirt-dbus.yaml index ff088e7..848ebf5 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: '{git_urls[libvirt-dbus][upstream]}' jobs: - autotools-build-job: parent_jobs: 'libvirt-glib-build' diff --git a/projects/libvirt-glib.yaml b/projects/libvirt-glib.yaml index 02ba50f..ba78815 100644 --- a/projects/libvirt-glib.yaml +++ b/projects/libvirt-glib.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: Libvirt GLib archive_format: gz - git_url: https://github.com/libvirt/libvirt-glib.git + git_url: '{git_urls[libvirt-glib][upstream]}' jobs: - autotools-build-job: parent_jobs: 'libvirt-build' diff --git a/projects/libvirt-go-xml.yaml b/projects/libvirt-go-xml.yaml index 4da955b..e42efda 100644 --- a/projects/libvirt-go-xml.yaml +++ b/projects/libvirt-go-xml.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: Libvirt Go XML archive_format: gz - git_url: https://github.com/libvirt/libvirt-go-xml.git + git_url: '{git_urls[libvirt-go-xml][upstream]}' jobs: - go-build-job: parent_jobs: 'libvirt-build' diff --git a/projects/libvirt-go.yaml b/projects/libvirt-go.yaml index 11ad037..0527c8d 100644 --- a/projects/libvirt-go.yaml +++ b/projects/libvirt-go.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: Libvirt Go archive_format: gz - git_url: https://github.com/libvirt/libvirt-go.git + git_url: '{git_urls[libvirt-go][upstream]}' jobs: - go-build-job: parent_jobs: 'libvirt-build' diff --git a/projects/libvirt-perl.yaml b/projects/libvirt-perl.yaml index c76b319..ae61bed 100644 --- a/projects/libvirt-perl.yaml +++ b/projects/libvirt-perl.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: Libvirt Perl archive_format: gz - git_url: https://github.com/libvirt/libvirt-perl.git + git_url: '{git_urls[libvirt-perl][upstream]}' jobs: - perl-modulebuild-build-job: parent_jobs: 'libvirt-build' diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml index 044010c..544e079 100644 --- a/projects/libvirt-python.yaml +++ b/projects/libvirt-python.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: Libvirt Python archive_format: gz - git_url: https://github.com/libvirt/libvirt-python.git + git_url: '{git_urls[libvirt-python][upstream]}' jobs: - python-distutils-build-job: parent_jobs: 'libvirt-build' diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml index 418a751..3194ee8 100644 --- a/projects/libvirt-sandbox.yaml +++ b/projects/libvirt-sandbox.yaml @@ -12,7 +12,7 @@ - libvirt-fedora-rawhide title: Libvirt Sandbox archive_format: gz - git_url: https://github.com/libvirt/libvirt-sandbox.git + git_url: '{git_urls[libvirt-sandbox][upstream]}' jobs: - autotools-build-job: parent_jobs: 'libvirt-glib-build' diff --git a/projects/libvirt-tck.yaml b/projects/libvirt-tck.yaml index 61174f9..b636d77 100644 --- a/projects/libvirt-tck.yaml +++ b/projects/libvirt-tck.yaml @@ -13,7 +13,7 @@ - libvirt-freebsd-11 title: Libvirt TCK archive_format: gz - git_url: https://github.com/libvirt/libvirt-tck.git + git_url: '{git_urls[libvirt-tck][upstream]}' jobs: - perl-modulebuild-build-job: parent_jobs: 'libvirt-perl-build' diff --git a/projects/libvirt.yaml b/projects/libvirt.yaml index 9feeb07..0d06dae 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: '{git_urls[libvirt][upstream]}' jobs: - autotools-build-job: parent_jobs: diff --git a/projects/osinfo-db-tools.yaml b/projects/osinfo-db-tools.yaml index 2ea08fd..aabe583 100644 --- a/projects/osinfo-db-tools.yaml +++ b/projects/osinfo-db-tools.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: osinfo database tools archive_format: gz - git_url: https://gitlab.com/libosinfo/osinfo-db-tools.git + git_url: '{git_urls[osinfo-db-tools][upstream]}' jobs: - autotools-build-job: parent_jobs: diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml index 3c044e8..b509b6e 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: '{git_urls[osinfo-db][upstream]}' jobs: - generic-build-job: parent_jobs: 'osinfo-db-tools-build' diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml index cae0f31..a2a1934 100644 --- a/projects/virt-manager.yaml +++ b/projects/virt-manager.yaml @@ -13,7 +13,7 @@ - libvirt-freebsd-11 title: Virtual Machine Manager archive_format: gz - git_url: https://github.com/virt-manager/virt-manager.git + git_url: '{git_urls[virt-manager][upstream]}' jobs: - python-distutils-build-job: parent_jobs: diff --git a/projects/virt-viewer.yaml b/projects/virt-viewer.yaml index 4eee446..b9a0b72 100644 --- a/projects/virt-viewer.yaml +++ b/projects/virt-viewer.yaml @@ -4,7 +4,7 @@ machines: '{all_machines}' title: Virt Viewer archive_format: gz - git_url: https://pagure.io/virt-viewer.git + git_url: '{git_urls[virt-viewer][upstream]}' jobs: - autotools-build-job: parent_jobs: 'libvirt-glib-build' -- 2.17.1

On Wed, Aug 29, 2018 at 05:09:03PM +0200, Andrea Bolognani wrote:
Out of the box, it contains the upstream repository for all projects; additionally, the user will be able to store information about their own repositories, making it possible to test-build in-progress branches before submitting the code upstream.
Despite all the pieces being now in place for us to get rid of the per-project "git_url" variable entirely, we can't actually do that because Jenkins Job Builder, unlike Ansible, doesn't support dictionary access with other variables being used as keys. That's fairly okay, though, because the Jenkins part is less dynamic than the Ansible one anyway.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> ---
With the change discussed in patch 1: Reviewed-by: Erik Skultety <eskultet@redhat.com>

This makes the build process use the value provided by the user through lcitool instead of the default. With this change, building arbitrary branches from arbitrary git repository through lcitool is fully working. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/projects/libosinfo.yml | 2 +- guests/playbooks/build/projects/libvirt-cim.yml | 2 +- guests/playbooks/build/projects/libvirt-dbus.yml | 2 +- guests/playbooks/build/projects/libvirt-glib.yml | 2 +- guests/playbooks/build/projects/libvirt-go-xml.yml | 2 +- guests/playbooks/build/projects/libvirt-go.yml | 2 +- guests/playbooks/build/projects/libvirt-perl.yml | 2 +- guests/playbooks/build/projects/libvirt-python.yml | 2 +- guests/playbooks/build/projects/libvirt-sandbox.yml | 2 +- guests/playbooks/build/projects/libvirt-tck.yml | 2 +- guests/playbooks/build/projects/libvirt.yml | 2 +- guests/playbooks/build/projects/osinfo-db-tools.yml | 2 +- guests/playbooks/build/projects/osinfo-db.yml | 2 +- guests/playbooks/build/projects/virt-manager.yml | 2 +- guests/playbooks/build/projects/virt-viewer.yml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/guests/playbooks/build/projects/libosinfo.yml b/guests/playbooks/build/projects/libosinfo.yml index 9082c33..bd59c58 100644 --- a/guests/playbooks/build/projects/libosinfo.yml +++ b/guests/playbooks/build/projects/libosinfo.yml @@ -3,7 +3,7 @@ name: libosinfo machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["libosinfo"]["upstream"] }}' + git_url: '{{ git_urls["libosinfo"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-cim.yml b/guests/playbooks/build/projects/libvirt-cim.yml index a5cc82f..d530ffb 100644 --- a/guests/playbooks/build/projects/libvirt-cim.yml +++ b/guests/playbooks/build/projects/libvirt-cim.yml @@ -3,7 +3,7 @@ name: libvirt-cim machines: '{{ rpm_machines }}' archive_format: gz - git_url: '{{ git_urls["libvirt-cim"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-cim"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-dbus.yml b/guests/playbooks/build/projects/libvirt-dbus.yml index 857c82a..69ba144 100644 --- a/guests/playbooks/build/projects/libvirt-dbus.yml +++ b/guests/playbooks/build/projects/libvirt-dbus.yml @@ -15,7 +15,7 @@ - libvirt-ubuntu-16 - libvirt-ubuntu-18 archive_format: xz - git_url: '{{ git_urls["libvirt-dbus"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-dbus"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-glib.yml b/guests/playbooks/build/projects/libvirt-glib.yml index 78a40bf..2a5170e 100644 --- a/guests/playbooks/build/projects/libvirt-glib.yml +++ b/guests/playbooks/build/projects/libvirt-glib.yml @@ -3,7 +3,7 @@ name: libvirt-glib machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["libvirt-glib"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-glib"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-go-xml.yml b/guests/playbooks/build/projects/libvirt-go-xml.yml index e5f7b12..ef932b4 100644 --- a/guests/playbooks/build/projects/libvirt-go-xml.yml +++ b/guests/playbooks/build/projects/libvirt-go-xml.yml @@ -3,7 +3,7 @@ name: libvirt-go-xml machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["libvirt-go-xml"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-go-xml"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/go-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-go.yml b/guests/playbooks/build/projects/libvirt-go.yml index 78f9856..6c59900 100644 --- a/guests/playbooks/build/projects/libvirt-go.yml +++ b/guests/playbooks/build/projects/libvirt-go.yml @@ -3,7 +3,7 @@ name: libvirt-go machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["libvirt-go"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-go"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/go-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-perl.yml b/guests/playbooks/build/projects/libvirt-perl.yml index f90a8ed..e5164f3 100644 --- a/guests/playbooks/build/projects/libvirt-perl.yml +++ b/guests/playbooks/build/projects/libvirt-perl.yml @@ -3,7 +3,7 @@ name: libvirt-perl machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["libvirt-perl"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-perl"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/perl-modulebuild-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-python.yml b/guests/playbooks/build/projects/libvirt-python.yml index ba67f1b..bc4e4c1 100644 --- a/guests/playbooks/build/projects/libvirt-python.yml +++ b/guests/playbooks/build/projects/libvirt-python.yml @@ -3,7 +3,7 @@ name: libvirt-python machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["libvirt-python"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-python"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/python-distutils-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-sandbox.yml b/guests/playbooks/build/projects/libvirt-sandbox.yml index e4021c4..6b6a3f6 100644 --- a/guests/playbooks/build/projects/libvirt-sandbox.yml +++ b/guests/playbooks/build/projects/libvirt-sandbox.yml @@ -14,7 +14,7 @@ - libvirt-ubuntu-16 - libvirt-ubuntu-18 archive_format: gz - git_url: '{{ git_urls["libvirt-sandbox"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-sandbox"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt-tck.yml b/guests/playbooks/build/projects/libvirt-tck.yml index 06d0c2a..e4b82cb 100644 --- a/guests/playbooks/build/projects/libvirt-tck.yml +++ b/guests/playbooks/build/projects/libvirt-tck.yml @@ -14,7 +14,7 @@ - libvirt-ubuntu-16 - libvirt-ubuntu-18 archive_format: gz - git_url: '{{ git_urls["libvirt-tck"]["upstream"] }}' + git_url: '{{ git_urls["libvirt-tck"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/perl-modulebuild-build-job.yml' diff --git a/guests/playbooks/build/projects/libvirt.yml b/guests/playbooks/build/projects/libvirt.yml index 1c5bdd2..a9d3397 100644 --- a/guests/playbooks/build/projects/libvirt.yml +++ b/guests/playbooks/build/projects/libvirt.yml @@ -3,7 +3,7 @@ name: libvirt machines: '{{ all_machines }}' archive_format: xz - git_url: '{{ git_urls["libvirt"]["upstream"] }}' + git_url: '{{ git_urls["libvirt"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/osinfo-db-tools.yml b/guests/playbooks/build/projects/osinfo-db-tools.yml index 26aa00a..0da981e 100644 --- a/guests/playbooks/build/projects/osinfo-db-tools.yml +++ b/guests/playbooks/build/projects/osinfo-db-tools.yml @@ -3,7 +3,7 @@ name: osinfo-db-tools machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["osinfo-db-tools"]["upstream"] }}' + git_url: '{{ git_urls["osinfo-db-tools"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' diff --git a/guests/playbooks/build/projects/osinfo-db.yml b/guests/playbooks/build/projects/osinfo-db.yml index a199040..cc88fe8 100644 --- a/guests/playbooks/build/projects/osinfo-db.yml +++ b/guests/playbooks/build/projects/osinfo-db.yml @@ -3,7 +3,7 @@ name: osinfo-db machines: '{{ all_machines }}' archive_format: xz - git_url: '{{ git_urls["osinfo-db"]["upstream"] }}' + git_url: '{{ git_urls["osinfo-db"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/generic-build-job.yml' diff --git a/guests/playbooks/build/projects/virt-manager.yml b/guests/playbooks/build/projects/virt-manager.yml index a648ea1..0dec7f6 100644 --- a/guests/playbooks/build/projects/virt-manager.yml +++ b/guests/playbooks/build/projects/virt-manager.yml @@ -15,7 +15,7 @@ - libvirt-freebsd-current - libvirt-ubuntu-18 archive_format: gz - git_url: '{{ git_urls["virt-manager"]["upstream"] }}' + git_url: '{{ git_urls["virt-manager"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/python-distutils-build-job.yml' diff --git a/guests/playbooks/build/projects/virt-viewer.yml b/guests/playbooks/build/projects/virt-viewer.yml index da1a562..fe1e140 100644 --- a/guests/playbooks/build/projects/virt-viewer.yml +++ b/guests/playbooks/build/projects/virt-viewer.yml @@ -3,7 +3,7 @@ name: virt-viewer machines: '{{ all_machines }}' archive_format: gz - git_url: '{{ git_urls["virt-viewer"]["upstream"] }}' + git_url: '{{ git_urls["virt-viewer"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' -- 2.17.1

On Wed, Aug 29, 2018 at 05:09:04PM +0200, Andrea Bolognani wrote:
This makes the build process use the value provided by the user through lcitool instead of the default.
With this change, building arbitrary branches from arbitrary git repository through lcitool is fully working.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- Reviewed-by: Erik Skultety <eskultet@redhat.com>

Provide instructions on how to build from non-default git repositories and branches. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/README.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guests/README.markdown b/guests/README.markdown index 68a6af7..f5d1219 100644 --- a/guests/README.markdown +++ b/guests/README.markdown @@ -49,11 +49,17 @@ 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 + lcitool -a build -h '*debian*' -p libvirt-python -r upstream/master will fetch libvirt-python's `master` branch from the upstream repository and build it on all Debian hosts. +You can add more git repositories by tweaking the `git_urls` dictionary +defined in `playbooks/build/jobs/defaults.yml` and then build arbitrary +branches out of those with + + lcitool -a build -h all -p libvirt -r github/cool-feature + Host setup ---------- -- 2.17.1

On Wed, Aug 29, 2018 at 05:09:05PM +0200, Andrea Bolognani wrote:
Provide instructions on how to build from non-default git repositories and branches.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> ---
With the necessary updates on '-g' being optional: Reviewed-by: Erik Skultety <eskultet@redhat.com>
guests/README.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/guests/README.markdown b/guests/README.markdown index 68a6af7..f5d1219 100644 --- a/guests/README.markdown +++ b/guests/README.markdown @@ -49,11 +49,17 @@ 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 + lcitool -a build -h '*debian*' -p libvirt-python -r upstream/master
will fetch libvirt-python's `master` branch from the upstream repository and build it on all Debian hosts.
+You can add more git repositories by tweaking the `git_urls` dictionary +defined in `playbooks/build/jobs/defaults.yml` and then build arbitrary +branches out of those with + + lcitool -a build -h all -p libvirt -r github/cool-feature +
Host setup ---------- -- 2.17.1
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (2)
-
Andrea Bolognani
-
Erik Skultety