[libvirt PATCH 0/5] ci: Use GitLab container registry

Andrea Bolognani posted 5 patches 3 years, 11 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200529130044.466874-1-abologna@redhat.com
.gitlab-ci.yml                                | 314 ++++++++++++++++--
ci/Makefile                                   |  23 +-
ci/containers/README.rst                      |  14 +
ci/containers/ci-centos-7.Dockerfile          | 137 ++++++++
ci/containers/ci-centos-8.Dockerfile          | 108 ++++++
.../ci-debian-10-cross-aarch64.Dockerfile     | 122 +++++++
.../ci-debian-10-cross-armv6l.Dockerfile      | 120 +++++++
.../ci-debian-10-cross-armv7l.Dockerfile      | 121 +++++++
.../ci-debian-10-cross-i686.Dockerfile        | 121 +++++++
.../ci-debian-10-cross-mips.Dockerfile        | 121 +++++++
.../ci-debian-10-cross-mips64el.Dockerfile    | 121 +++++++
.../ci-debian-10-cross-mipsel.Dockerfile      | 121 +++++++
.../ci-debian-10-cross-ppc64le.Dockerfile     | 121 +++++++
.../ci-debian-10-cross-s390x.Dockerfile       | 121 +++++++
ci/containers/ci-debian-10.Dockerfile         | 112 +++++++
.../ci-debian-9-cross-aarch64.Dockerfile      | 126 +++++++
.../ci-debian-9-cross-armv6l.Dockerfile       | 124 +++++++
.../ci-debian-9-cross-armv7l.Dockerfile       | 125 +++++++
.../ci-debian-9-cross-mips.Dockerfile         | 125 +++++++
.../ci-debian-9-cross-mips64el.Dockerfile     | 125 +++++++
.../ci-debian-9-cross-mipsel.Dockerfile       | 125 +++++++
.../ci-debian-9-cross-ppc64le.Dockerfile      | 125 +++++++
.../ci-debian-9-cross-s390x.Dockerfile        | 125 +++++++
ci/containers/ci-debian-9.Dockerfile          | 116 +++++++
.../ci-debian-sid-cross-aarch64.Dockerfile    | 122 +++++++
.../ci-debian-sid-cross-armv6l.Dockerfile     | 120 +++++++
.../ci-debian-sid-cross-armv7l.Dockerfile     | 121 +++++++
.../ci-debian-sid-cross-i686.Dockerfile       | 121 +++++++
.../ci-debian-sid-cross-mips.Dockerfile       | 121 +++++++
.../ci-debian-sid-cross-mips64el.Dockerfile   | 121 +++++++
.../ci-debian-sid-cross-mipsel.Dockerfile     | 120 +++++++
.../ci-debian-sid-cross-ppc64le.Dockerfile    | 121 +++++++
.../ci-debian-sid-cross-s390x.Dockerfile      | 121 +++++++
ci/containers/ci-debian-sid.Dockerfile        | 112 +++++++
ci/containers/ci-fedora-31.Dockerfile         | 109 ++++++
ci/containers/ci-fedora-32.Dockerfile         | 109 ++++++
...ci-fedora-rawhide-cross-mingw32.Dockerfile | 129 +++++++
...ci-fedora-rawhide-cross-mingw64.Dockerfile | 129 +++++++
ci/containers/ci-fedora-rawhide.Dockerfile    | 110 ++++++
ci/containers/ci-opensuse-151.Dockerfile      | 109 ++++++
ci/containers/ci-ubuntu-1804.Dockerfile       | 117 +++++++
ci/containers/ci-ubuntu-2004.Dockerfile       | 113 +++++++
ci/containers/refresh                         |  43 +++
ci/list-images.sh                             |  24 +-
44 files changed, 5054 insertions(+), 51 deletions(-)
create mode 100644 ci/containers/README.rst
create mode 100644 ci/containers/ci-centos-7.Dockerfile
create mode 100644 ci/containers/ci-centos-8.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-aarch64.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-armv6l.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-armv7l.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-i686.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-mips.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-mips64el.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-mipsel.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-ppc64le.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-s390x.Dockerfile
create mode 100644 ci/containers/ci-debian-10.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-aarch64.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-armv6l.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-armv7l.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-mips.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-mips64el.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-mipsel.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-ppc64le.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-s390x.Dockerfile
create mode 100644 ci/containers/ci-debian-9.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-aarch64.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-armv6l.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-armv7l.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-i686.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-mips.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-mips64el.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-mipsel.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-ppc64le.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-s390x.Dockerfile
create mode 100644 ci/containers/ci-debian-sid.Dockerfile
create mode 100644 ci/containers/ci-fedora-31.Dockerfile
create mode 100644 ci/containers/ci-fedora-32.Dockerfile
create mode 100644 ci/containers/ci-fedora-rawhide-cross-mingw32.Dockerfile
create mode 100644 ci/containers/ci-fedora-rawhide-cross-mingw64.Dockerfile
create mode 100644 ci/containers/ci-fedora-rawhide.Dockerfile
create mode 100644 ci/containers/ci-opensuse-151.Dockerfile
create mode 100644 ci/containers/ci-ubuntu-1804.Dockerfile
create mode 100644 ci/containers/ci-ubuntu-2004.Dockerfile
create mode 100755 ci/containers/refresh
[libvirt PATCH 0/5] ci: Use GitLab container registry
Posted by Andrea Bolognani 3 years, 11 months ago
Branch: https://gitlab.com/abologna/libvirt/-/tree/ci-full-gitlab-registry
Pipeline: https://gitlab.com/abologna/libvirt/pipelines/150891361

This is what we're already doing with the subprojects we've migrated
to GitLab CI and, as of earlier today, all projects under the
libosinfo umbrella.

Once this is merged, we can stop publishing container images on Quay
and archive the libvirt-dockerfiles repository.

Patch 3/5 has been trimmed in order to comply with the size limits
of the mailing list. You can grab the unabridged version with

  $ git fetch https://gitlab.com/abologna/libvirt ci-full-gitlab-registry

Andrea Bolognani (5):
  ci: Use variables to build image names
  ci: Add 'other' stage
  ci: Use GitLab container registry
  ci: Update build system integration
  ci: Improve CI_IMAGE_TAG handling

 .gitlab-ci.yml                                | 314 ++++++++++++++++--
 ci/Makefile                                   |  23 +-
 ci/containers/README.rst                      |  14 +
 ci/containers/ci-centos-7.Dockerfile          | 137 ++++++++
 ci/containers/ci-centos-8.Dockerfile          | 108 ++++++
 .../ci-debian-10-cross-aarch64.Dockerfile     | 122 +++++++
 .../ci-debian-10-cross-armv6l.Dockerfile      | 120 +++++++
 .../ci-debian-10-cross-armv7l.Dockerfile      | 121 +++++++
 .../ci-debian-10-cross-i686.Dockerfile        | 121 +++++++
 .../ci-debian-10-cross-mips.Dockerfile        | 121 +++++++
 .../ci-debian-10-cross-mips64el.Dockerfile    | 121 +++++++
 .../ci-debian-10-cross-mipsel.Dockerfile      | 121 +++++++
 .../ci-debian-10-cross-ppc64le.Dockerfile     | 121 +++++++
 .../ci-debian-10-cross-s390x.Dockerfile       | 121 +++++++
 ci/containers/ci-debian-10.Dockerfile         | 112 +++++++
 .../ci-debian-9-cross-aarch64.Dockerfile      | 126 +++++++
 .../ci-debian-9-cross-armv6l.Dockerfile       | 124 +++++++
 .../ci-debian-9-cross-armv7l.Dockerfile       | 125 +++++++
 .../ci-debian-9-cross-mips.Dockerfile         | 125 +++++++
 .../ci-debian-9-cross-mips64el.Dockerfile     | 125 +++++++
 .../ci-debian-9-cross-mipsel.Dockerfile       | 125 +++++++
 .../ci-debian-9-cross-ppc64le.Dockerfile      | 125 +++++++
 .../ci-debian-9-cross-s390x.Dockerfile        | 125 +++++++
 ci/containers/ci-debian-9.Dockerfile          | 116 +++++++
 .../ci-debian-sid-cross-aarch64.Dockerfile    | 122 +++++++
 .../ci-debian-sid-cross-armv6l.Dockerfile     | 120 +++++++
 .../ci-debian-sid-cross-armv7l.Dockerfile     | 121 +++++++
 .../ci-debian-sid-cross-i686.Dockerfile       | 121 +++++++
 .../ci-debian-sid-cross-mips.Dockerfile       | 121 +++++++
 .../ci-debian-sid-cross-mips64el.Dockerfile   | 121 +++++++
 .../ci-debian-sid-cross-mipsel.Dockerfile     | 120 +++++++
 .../ci-debian-sid-cross-ppc64le.Dockerfile    | 121 +++++++
 .../ci-debian-sid-cross-s390x.Dockerfile      | 121 +++++++
 ci/containers/ci-debian-sid.Dockerfile        | 112 +++++++
 ci/containers/ci-fedora-31.Dockerfile         | 109 ++++++
 ci/containers/ci-fedora-32.Dockerfile         | 109 ++++++
 ...ci-fedora-rawhide-cross-mingw32.Dockerfile | 129 +++++++
 ...ci-fedora-rawhide-cross-mingw64.Dockerfile | 129 +++++++
 ci/containers/ci-fedora-rawhide.Dockerfile    | 110 ++++++
 ci/containers/ci-opensuse-151.Dockerfile      | 109 ++++++
 ci/containers/ci-ubuntu-1804.Dockerfile       | 117 +++++++
 ci/containers/ci-ubuntu-2004.Dockerfile       | 113 +++++++
 ci/containers/refresh                         |  43 +++
 ci/list-images.sh                             |  24 +-
 44 files changed, 5054 insertions(+), 51 deletions(-)
 create mode 100644 ci/containers/README.rst
 create mode 100644 ci/containers/ci-centos-7.Dockerfile
 create mode 100644 ci/containers/ci-centos-8.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-aarch64.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-armv6l.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-armv7l.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-i686.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-mips.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-mips64el.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-mipsel.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-ppc64le.Dockerfile
 create mode 100644 ci/containers/ci-debian-10-cross-s390x.Dockerfile
 create mode 100644 ci/containers/ci-debian-10.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-aarch64.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-armv6l.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-armv7l.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-mips.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-mips64el.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-mipsel.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-ppc64le.Dockerfile
 create mode 100644 ci/containers/ci-debian-9-cross-s390x.Dockerfile
 create mode 100644 ci/containers/ci-debian-9.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-aarch64.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-armv6l.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-armv7l.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-i686.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-mips.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-mips64el.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-mipsel.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-ppc64le.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid-cross-s390x.Dockerfile
 create mode 100644 ci/containers/ci-debian-sid.Dockerfile
 create mode 100644 ci/containers/ci-fedora-31.Dockerfile
 create mode 100644 ci/containers/ci-fedora-32.Dockerfile
 create mode 100644 ci/containers/ci-fedora-rawhide-cross-mingw32.Dockerfile
 create mode 100644 ci/containers/ci-fedora-rawhide-cross-mingw64.Dockerfile
 create mode 100644 ci/containers/ci-fedora-rawhide.Dockerfile
 create mode 100644 ci/containers/ci-opensuse-151.Dockerfile
 create mode 100644 ci/containers/ci-ubuntu-1804.Dockerfile
 create mode 100644 ci/containers/ci-ubuntu-2004.Dockerfile
 create mode 100755 ci/containers/refresh

-- 
2.25.4

Re: [libvirt PATCH 0/5] ci: Use GitLab container registry
Posted by Pavel Hrdina 3 years, 10 months ago
On Fri, May 29, 2020 at 03:00:39PM +0200, Andrea Bolognani wrote:
> Branch: https://gitlab.com/abologna/libvirt/-/tree/ci-full-gitlab-registry
> Pipeline: https://gitlab.com/abologna/libvirt/pipelines/150891361
> 
> This is what we're already doing with the subprojects we've migrated
> to GitLab CI and, as of earlier today, all projects under the
> libosinfo umbrella.
> 
> Once this is merged, we can stop publishing container images on Quay
> and archive the libvirt-dockerfiles repository.
> 
> Patch 3/5 has been trimmed in order to comply with the size limits
> of the mailing list. You can grab the unabridged version with
> 
>   $ git fetch https://gitlab.com/abologna/libvirt ci-full-gitlab-registry

This is a lot of files and lines of text/code. I was wondering about
building the dockerfiles as part of the container_job_definition.

To me it seems like a lot of duplication and a lot of noise in the
future if we decide to change the dockerfiles generation. The main
difference that I can think of is that with files in repository we
need to regenerate all the dockerfiles to apply changes made in
libvirt-ci but with the automatic generation we would have that for
free.

Both approaches have some benefits and drawbacks and I guess we could
have some variable to prevent automatic generation of dockerfiles to
make sure that unwanted changes in libvirt-ci doesn't affect CI for
all libvirt repositories, on the other hand it would automatically
check that changes to libvirt-ci doesn't break anything.

I personally don't like the need to introduce 5000+ lines just for
compilation testing.

Pavel
Re: [libvirt PATCH 0/5] ci: Use GitLab container registry
Posted by Daniel P. Berrangé 3 years, 10 months ago
On Mon, Jun 01, 2020 at 04:51:19PM +0200, Pavel Hrdina wrote:
> On Fri, May 29, 2020 at 03:00:39PM +0200, Andrea Bolognani wrote:
> > Branch: https://gitlab.com/abologna/libvirt/-/tree/ci-full-gitlab-registry
> > Pipeline: https://gitlab.com/abologna/libvirt/pipelines/150891361
> > 
> > This is what we're already doing with the subprojects we've migrated
> > to GitLab CI and, as of earlier today, all projects under the
> > libosinfo umbrella.
> > 
> > Once this is merged, we can stop publishing container images on Quay
> > and archive the libvirt-dockerfiles repository.
> > 
> > Patch 3/5 has been trimmed in order to comply with the size limits
> > of the mailing list. You can grab the unabridged version with
> > 
> >   $ git fetch https://gitlab.com/abologna/libvirt ci-full-gitlab-registry
> 
> This is a lot of files and lines of text/code. I was wondering about
> building the dockerfiles as part of the container_job_definition.
> 
> To me it seems like a lot of duplication and a lot of noise in the
> future if we decide to change the dockerfiles generation. The main
> difference that I can think of is that with files in repository we
> need to regenerate all the dockerfiles to apply changes made in
> libvirt-ci but with the automatic generation we would have that for
> free.

The key reason for keeping the dockerfiles in the libvirt.git repo and
NOT auto-generating them on the fly is to ensure the CI process is
self-contained, with no dependancy on external moving parts in other
git repos.

If you automatically generated dockerfiles from libvirt-ci.git, then
you end up with unstable CI when changes in libvirt.git need to be
made in lock-step with changes in libvirt-ci.git. If you change
libvirt.git first, CI will break if it runs before libvirt-ci.git
is updated. If you change libvirt-ci.git first, then CI will break
if it runs before libvirt.git is updated. This is a no-win situation.
This is especially painful when you consider that a user's fork of
libvirt.git may not updated to current master. Or consider a user
who needs to make changes to libvirt.git that require updated
dockerfiles and needs to be able to test them before any change
in libvirt-ci.git is present.

We've seen these problems many times with our current Jenkins setup
where CI breaks for a period when we have to do matching updates
between both libvirt-ci.git & libvirt.git.

With dockerfiles kept in libvirt.git we know that the containers
we're building will always contain exactly what we need. This also
makes it easy for users to experiment with changes, as they can
modify the dockerfiles directly to add/remove pieces. Such changes
can be propagated back to libvirt-ci.git out of band.

> Both approaches have some benefits and drawbacks and I guess we could
> have some variable to prevent automatic generation of dockerfiles to
> make sure that unwanted changes in libvirt-ci doesn't affect CI for
> all libvirt repositories, on the other hand it would automatically
> check that changes to libvirt-ci doesn't break anything.

Changes to libvirt-ci that affect the dockerfiles, should come with
a URL pointer to a merge request against the affected project(s),
showing the succesful CI run with updated dockerfiles.

> I personally don't like the need to introduce 5000+ lines just for
> compilation testing.

That's a tiny proportion of the code we have in libvirt.git, so IMHO
it is not worth worrying about. The benefits of having the CI self
contained far outweigh the downside.

Essentially we are prioritizing the main libvirt.git as that is the
primary content from the POV of most contributors.

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 :|

Re: [libvirt PATCH 0/5] ci: Use GitLab container registry
Posted by Andrea Bolognani 3 years, 10 months ago
On Mon, 2020-06-01 at 16:51 +0200, Pavel Hrdina wrote:
> On Fri, May 29, 2020 at 03:00:39PM +0200, Andrea Bolognani wrote:
> > Branch: https://gitlab.com/abologna/libvirt/-/tree/ci-full-gitlab-registry
> > Pipeline: https://gitlab.com/abologna/libvirt/pipelines/150891361
> > 
> > This is what we're already doing with the subprojects we've migrated
> > to GitLab CI and, as of earlier today, all projects under the
> > libosinfo umbrella.
> > 
> > Once this is merged, we can stop publishing container images on Quay
> > and archive the libvirt-dockerfiles repository.
> > 
> > Patch 3/5 has been trimmed in order to comply with the size limits
> > of the mailing list. You can grab the unabridged version with
> > 
> >   $ git fetch https://gitlab.com/abologna/libvirt ci-full-gitlab-registry
> 
> This is a lot of files and lines of text/code. I was wondering about
> building the dockerfiles as part of the container_job_definition.
> 
> To me it seems like a lot of duplication and a lot of noise in the
> future if we decide to change the dockerfiles generation. The main
> difference that I can think of is that with files in repository we
> need to regenerate all the dockerfiles to apply changes made in
> libvirt-ci but with the automatic generation we would have that for
> free.
> 
> Both approaches have some benefits and drawbacks and I guess we could
> have some variable to prevent automatic generation of dockerfiles to
> make sure that unwanted changes in libvirt-ci doesn't affect CI for
> all libvirt repositories, on the other hand it would automatically
> check that changes to libvirt-ci doesn't break anything.
> 
> I personally don't like the need to introduce 5000+ lines just for
> compilation testing.

To prevent unwanted changes to slip in, we could make libvirt-ci
a submodule and only bump the hash when we specifically want to
update something.

Overall I'd be perfectly okay with the approach you suggest, though
I reserve the right to change my mind about this after having tried
to implement it :) Adding Dan to the conversation so that he
can weigh in.

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 0/5] ci: Use GitLab container registry
Posted by Daniel P. Berrangé 3 years, 10 months ago
On Mon, Jun 01, 2020 at 05:31:45PM +0200, Andrea Bolognani wrote:
> On Mon, 2020-06-01 at 16:51 +0200, Pavel Hrdina wrote:
> > On Fri, May 29, 2020 at 03:00:39PM +0200, Andrea Bolognani wrote:
> > > Branch: https://gitlab.com/abologna/libvirt/-/tree/ci-full-gitlab-registry
> > > Pipeline: https://gitlab.com/abologna/libvirt/pipelines/150891361
> > > 
> > > This is what we're already doing with the subprojects we've migrated
> > > to GitLab CI and, as of earlier today, all projects under the
> > > libosinfo umbrella.
> > > 
> > > Once this is merged, we can stop publishing container images on Quay
> > > and archive the libvirt-dockerfiles repository.
> > > 
> > > Patch 3/5 has been trimmed in order to comply with the size limits
> > > of the mailing list. You can grab the unabridged version with
> > > 
> > >   $ git fetch https://gitlab.com/abologna/libvirt ci-full-gitlab-registry
> > 
> > This is a lot of files and lines of text/code. I was wondering about
> > building the dockerfiles as part of the container_job_definition.
> > 
> > To me it seems like a lot of duplication and a lot of noise in the
> > future if we decide to change the dockerfiles generation. The main
> > difference that I can think of is that with files in repository we
> > need to regenerate all the dockerfiles to apply changes made in
> > libvirt-ci but with the automatic generation we would have that for
> > free.
> > 
> > Both approaches have some benefits and drawbacks and I guess we could
> > have some variable to prevent automatic generation of dockerfiles to
> > make sure that unwanted changes in libvirt-ci doesn't affect CI for
> > all libvirt repositories, on the other hand it would automatically
> > check that changes to libvirt-ci doesn't break anything.
> > 
> > I personally don't like the need to introduce 5000+ lines just for
> > compilation testing.
> 
> To prevent unwanted changes to slip in, we could make libvirt-ci
> a submodule and only bump the hash when we specifically want to
> update something.
> 
> Overall I'd be perfectly okay with the approach you suggest, though
> I reserve the right to change my mind about this after having tried
> to implement it :) Adding Dan to the conversation so that he
> can weigh in.

Submodules introduce a extra layer of pain for people whose changes
involve modifications to the dockerfile. Per my other reply, the goal
here is that someone changinging libvirt.git should be able to modify
the dockerfile and have CI jobs "just work" for their merge request.
They should only need to touch libvirt-ci.git once they have got
everything working for their libvirt.git changes & CI.

Involving libvirt-ci.git makes the update workflow something like
this:

 - Fork libvirt.git
 - Fork libvirt-ci.git
 - Make code changes that need dockerfile update in libvirt.git
 - Update forked libvirt.git to point to fork of libvirt-ci.git
 - Make lcitool related changes in libvirt-ci.git
 - Commit lcitool related changes in libvirt-ci.git
 - Update forked libvirt.git submodule hash to point to libvirt-ci.git update
 - If CI fails, repeat last three steps
 - Submit merge request for libvirt-ci.git
 - Submit merge request for libvirt.git
 - If libvirt.git change is approved, then merge libvirt-ci.git change
 - Update forked libvirt.git to point back to main libvirt-ci.git
 - Refresh merge request for libvirt.git
 - Approve and merge libvirt.git merge request

By committing dockerfiles we have a simpler life

 - Fork libvirt.git
 - Fork libvirt-ci.git
 - Make code changes that need dockerfile update in libvirt.git
 - Make lcitool related changes  in libvirt-ci.git
 - Re-generate dockerfiles with lcitool from your fork
 - If CI fails, repeat last two steps
 - Commit lcitool related changes in libvirt-ci.git
 - Submit merge request for libvirt.git
 - Submit merge request for libvirt-ci.git
 - Approve and merge libvirt.git merge request
 - Approve and merge libvirt-ci.git merge request

In the second case, the preson updating libvirt-ci.git doesn't even
have to be the same as the person who submits the libvirt.git updates,
as it can be done out of band to some extent. eg we can do this:

 - Fork libvirt.git
 - Make code changes that need dockerfile update in libvirt.git
 - Edit dockerfiles with needed changes
 - If CI fails, repeat last step
 - Submit merge request for libvirt.git
 - Approve and merge libvirt.git merge request

and

 - Fork libvirt-ci.git
 - Make lcitool related changes  in libvirt-ci.git
 - Commit lcitool related changes in libvirt-ci.git
 - Submit merge request for libvirt-ci.git
 - Approve and merge libvirt-ci.git merge request

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 :|

Re: [libvirt PATCH 0/5] ci: Use GitLab container registry
Posted by Andrea Bolognani 3 years, 10 months ago
On Mon, 2020-06-01 at 16:55 +0100, Daniel P. Berrangé wrote:
> By committing dockerfiles we have a simpler life
> 
>  - Fork libvirt.git
>  - Fork libvirt-ci.git
>  - Make code changes that need dockerfile update in libvirt.git
>  - Make lcitool related changes  in libvirt-ci.git
>  - Re-generate dockerfiles with lcitool from your fork
>  - If CI fails, repeat last two steps
>  - Commit lcitool related changes in libvirt-ci.git
>  - Submit merge request for libvirt.git
>  - Submit merge request for libvirt-ci.git
>  - Approve and merge libvirt.git merge request
>  - Approve and merge libvirt-ci.git merge request
> 
> In the second case, the preson updating libvirt-ci.git doesn't even
> have to be the same as the person who submits the libvirt.git updates,
> as it can be done out of band to some extent. eg we can do this:
> 
>  - Fork libvirt.git
>  - Make code changes that need dockerfile update in libvirt.git
>  - Edit dockerfiles with needed changes
>  - If CI fails, repeat last step
>  - Submit merge request for libvirt.git
>  - Approve and merge libvirt.git merge request
> 
> and
> 
>  - Fork libvirt-ci.git
>  - Make lcitool related changes  in libvirt-ci.git
>  - Commit lcitool related changes in libvirt-ci.git
>  - Submit merge request for libvirt-ci.git
>  - Approve and merge libvirt-ci.git merge request

These, and the ones made in the other message, are very solid points.

I have to say, however, that I'm not a fan of the idea of updating
the per-repository Dockerfiles before the corresponding code change
has made its way into libvirt-ci.git: ideally, it would works the
other way around and the libvirt.git commit would contain a reference
to the corresponding libvirt-ci.git commit, just like we're doing
right now in libvirt-dockerfiles.git.

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 0/5] ci: Use GitLab container registry
Posted by Pavel Hrdina 3 years, 10 months ago
On Mon, Jun 01, 2020 at 06:45:25PM +0200, Andrea Bolognani wrote:
> On Mon, 2020-06-01 at 16:55 +0100, Daniel P. Berrangé wrote:
> > By committing dockerfiles we have a simpler life
> > 
> >  - Fork libvirt.git
> >  - Fork libvirt-ci.git
> >  - Make code changes that need dockerfile update in libvirt.git
> >  - Make lcitool related changes  in libvirt-ci.git
> >  - Re-generate dockerfiles with lcitool from your fork
> >  - If CI fails, repeat last two steps
> >  - Commit lcitool related changes in libvirt-ci.git
> >  - Submit merge request for libvirt.git
> >  - Submit merge request for libvirt-ci.git
> >  - Approve and merge libvirt.git merge request
> >  - Approve and merge libvirt-ci.git merge request
> > 
> > In the second case, the preson updating libvirt-ci.git doesn't even
> > have to be the same as the person who submits the libvirt.git updates,
> > as it can be done out of band to some extent. eg we can do this:
> > 
> >  - Fork libvirt.git
> >  - Make code changes that need dockerfile update in libvirt.git
> >  - Edit dockerfiles with needed changes
> >  - If CI fails, repeat last step
> >  - Submit merge request for libvirt.git
> >  - Approve and merge libvirt.git merge request
> > 
> > and
> > 
> >  - Fork libvirt-ci.git
> >  - Make lcitool related changes  in libvirt-ci.git
> >  - Commit lcitool related changes in libvirt-ci.git
> >  - Submit merge request for libvirt-ci.git
> >  - Approve and merge libvirt-ci.git merge request
> 
> These, and the ones made in the other message, are very solid points.
> 
> I have to say, however, that I'm not a fan of the idea of updating
> the per-repository Dockerfiles before the corresponding code change
> has made its way into libvirt-ci.git: ideally, it would works the
> other way around and the libvirt.git commit would contain a reference
> to the corresponding libvirt-ci.git commit, just like we're doing
> right now in libvirt-dockerfiles.git.

I have to agree that all of it makes sense. Doesn't change the fact,
that I don't like it :).

Thanks,

Pavel