[libvirt] [jenkins-ci PATCH 0/2] git changes to reflect new CI configuration

Pavel Hrdina (2): jobs: Change git URL to github jobs: Switch to github webhook instead of polling jobs/autotools.yaml | 5 ++--- jobs/generic.yaml | 5 ++--- jobs/go.yaml | 5 ++--- jobs/perl-modulebuild.yaml | 5 ++--- jobs/python-distutils.yaml | 5 ++--- 5 files changed, 10 insertions(+), 15 deletions(-) -- 2.17.1

We had our own local copy of all projects synchronized by cron on the host where we have the CI VMs. This was to safe the traffic from libvirt.org repositories and to make the cloning for our Jenkins jobs faster. We might move our VMs into a cloud in future we would not be able to have any local copy so this changes the git URL to use github instead. Signed-off-by: Pavel Hrdina <phrdina@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 f526ed2..63a1e81 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: git://n64.pufty.ci.centos.org/{name}.git + url: https://github.com/libvirt/{name}.git branches: - origin/{branch} clean: diff --git a/jobs/generic.yaml b/jobs/generic.yaml index 3e20962..7919274 100644 --- a/jobs/generic.yaml +++ b/jobs/generic.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: git://n64.pufty.ci.centos.org/{name}.git + url: https://github.com/libvirt/{name}.git branches: - origin/{branch} clean: diff --git a/jobs/go.yaml b/jobs/go.yaml index bffe56e..04ba49a 100644 --- a/jobs/go.yaml +++ b/jobs/go.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: git://n64.pufty.ci.centos.org/{name}.git + url: https://github.com/libvirt/{name}.git branches: - origin/{branch} clean: diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml index 4a79bab..ef16c6e 100644 --- a/jobs/perl-modulebuild.yaml +++ b/jobs/perl-modulebuild.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: git://n64.pufty.ci.centos.org/{name}.git + url: https://github.com/libvirt/{name}.git branches: - origin/{branch} clean: diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index c075245..9e64c84 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: git://n64.pufty.ci.centos.org/{name}.git + url: https://github.com/libvirt/{name}.git branches: - origin/{branch} clean: -- 2.17.1

On Thu, 2018-06-21 at 14:21 +0200, Pavel Hrdina wrote:
We had our own local copy of all projects synchronized by cron on the host where we have the CI VMs. This was to safe the traffic from libvirt.org repositories and to make the cloning for our Jenkins jobs faster.
We might move our VMs into a cloud in future we would not be able to have any local copy so this changes the git URL to use github instead.
Signed-off-by: Pavel Hrdina <phrdina@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 f526ed2..63a1e81 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -21,7 +21,7 @@ num-to-keep: 1000 scm: - git: - url: git://n64.pufty.ci.centos.org/{name}.git + url: https://github.com/libvirt/{name}.git
This will work for libvirt: https://github.com/libvirt/libvirt.git libvirt-cim: https://github.com/libvirt/libvirt-cim.git libvirt-dbus: https://github.com/libvirt/libvirt-dbus.git libvirt-glib: https://github.com/libvirt/libvirt-glib.git libvirt-go: https://github.com/libvirt/libvirt-go.git libvirt-go-xml: https://github.com/libvirt/libvirt-go-xml.git libvirt-perl: https://github.com/libvirt/libvirt-perl.git libvirt-python: https://github.com/libvirt/libvirt-python.git libvirt-sandbox: https://github.com/libvirt/libvirt-sandbox.git libvirt-tck: https://github.com/libvirt/libvirt-tck.git but not for virt-manager: https://github.com/virt-manager/virt-manager.git because of the different namespace, and also not for libosinfo: https://gitlab.com/libosinfo/libosinfo.git osinfo-db-tools: https://gitlab.com/libosinfo/osinfo-db-tools.git osinfo-db: https://gitlab.com/libosinfo/osinfo-db.git virt-viewer: https://pagure.io/virt-viewer.git because of the completely different hosting platform, so we're going to need this to be overridable on a per-project basis. -- Andrea Bolognani / Red Hat / Virtualization

If we use github as the remote repository we can take advantage of github webhooks in order to trigger our Jobs instead of blind polling. CentOS CI provides that option [1]. [1] <https://ci.centos.org/github-webhook/> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- jobs/autotools.yaml | 3 +-- jobs/generic.yaml | 3 +-- jobs/go.yaml | 3 +-- jobs/perl-modulebuild.yaml | 3 +-- jobs/python-distutils.yaml | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml index 63a1e81..8a97a7a 100644 --- a/jobs/autotools.yaml +++ b/jobs/autotools.yaml @@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github axes: - axis: name: systems diff --git a/jobs/generic.yaml b/jobs/generic.yaml index 7919274..770b781 100644 --- a/jobs/generic.yaml +++ b/jobs/generic.yaml @@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github axes: - axis: name: systems diff --git a/jobs/go.yaml b/jobs/go.yaml index 04ba49a..7616185 100644 --- a/jobs/go.yaml +++ b/jobs/go.yaml @@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github axes: - axis: name: systems diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml index ef16c6e..329bfcd 100644 --- a/jobs/perl-modulebuild.yaml +++ b/jobs/perl-modulebuild.yaml @@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github axes: - axis: name: systems diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index 9e64c84..dca016e 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github axes: - axis: name: systems -- 2.17.1

On Thu, 2018-06-21 at 14:21 +0200, Pavel Hrdina wrote: [...]
@@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github
As noted in the review for the previous patch libosinfo: https://gitlab.com/libosinfo/libosinfo.git osinfo-db-tools: https://gitlab.com/libosinfo/osinfo-db-tools.git osinfo-db: https://gitlab.com/libosinfo/osinfo-db.git virt-viewer: https://pagure.io/virt-viewer.git are not hosted on GitHub, so the above won't work for them. There's probably a way to make something like this work for GitLab too, but I'm not very confident about Pagure. Perhaps we can convince the projects listed above to set up mirroring to GitHub... -- Andrea Bolognani / Red Hat / Virtualization

On Thu, Jun 21, 2018 at 03:37:49PM +0200, Andrea Bolognani wrote:
On Thu, 2018-06-21 at 14:21 +0200, Pavel Hrdina wrote: [...]
@@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github
As noted in the review for the previous patch
libosinfo: https://gitlab.com/libosinfo/libosinfo.git osinfo-db-tools: https://gitlab.com/libosinfo/osinfo-db-tools.git osinfo-db: https://gitlab.com/libosinfo/osinfo-db.git virt-viewer: https://pagure.io/virt-viewer.git
are not hosted on GitHub, so the above won't work for them.
There's probably a way to make something like this work for GitLab too, but I'm not very confident about Pagure.
Perhaps we can convince the projects listed above to set up mirroring to GitHub...
I think its better if we just leave the jenkins config using pollscm as it does today, but simply point it at an appropriate repo for each project, instead of using github webhooks or the local cached git. This kind of need to mirror/move everything to github just to use their unique features, is exactly the kind of embrace & extend that makes github undesirable. Better to stick to core git functionality. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Thu, Jun 21, 2018 at 02:50:49PM +0100, Daniel P. Berrangé wrote:
On Thu, Jun 21, 2018 at 03:37:49PM +0200, Andrea Bolognani wrote:
On Thu, 2018-06-21 at 14:21 +0200, Pavel Hrdina wrote: [...]
@@ -31,8 +31,7 @@ triggers: - reverse: jobs: '{obj:parent_jobs}' - - pollscm: - cron: "H/20 * * * *" + - github
As noted in the review for the previous patch
libosinfo: https://gitlab.com/libosinfo/libosinfo.git osinfo-db-tools: https://gitlab.com/libosinfo/osinfo-db-tools.git osinfo-db: https://gitlab.com/libosinfo/osinfo-db.git virt-viewer: https://pagure.io/virt-viewer.git
are not hosted on GitHub, so the above won't work for them.
There's probably a way to make something like this work for GitLab too, but I'm not very confident about Pagure.
Perhaps we can convince the projects listed above to set up mirroring to GitHub...
I think its better if we just leave the jenkins config using pollscm as it does today, but simply point it at an appropriate repo for each project, instead of using github webhooks or the local cached git.
This kind of need to mirror/move everything to github just to use their unique features, is exactly the kind of embrace & extend that makes github undesirable. Better to stick to core git functionality.
Yes, I agree with that. I'll work on the changes required for the first patch. Thanks Pavel
participants (3)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Pavel Hrdina