We're already building libvirt in the containers already, if we publish
the build in form of, say, RPMs, later stages of the pipeline can
consume the RPMs instead of re-building libvirt from scratch.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
.gitlab-ci.yml | 3 ++-
ci/gitlab.yml | 18 ++++++++++++++++++
ci/manifest.yml | 21 ++++++++++++++++++++-
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6ba11a0431..4bcaf22ce2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,7 +30,8 @@ include: '/ci/gitlab.yml'
- meson dist -C build --no-tests
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
then
- rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz;
+ rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta build/meson-dist/libvirt-*.tar.xz;
+ mv rpmbuild/RPMS/x86_64 libvirt-rpms ;
else
meson compile -C build;
meson test -C build --no-suite syntax-check --print-errorlogs;
diff --git a/ci/gitlab.yml b/ci/gitlab.yml
index 03dee70480..3fbe4b3f8c 100644
--- a/ci/gitlab.yml
+++ b/ci/gitlab.yml
@@ -407,6 +407,11 @@ x86_64-centos-stream-8:
allow_failure: false
variables:
NAME: centos-stream-8
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
+
x86_64-centos-stream-9:
extends: .native_build_job
@@ -415,6 +420,11 @@ x86_64-centos-stream-9:
allow_failure: false
variables:
NAME: centos-stream-9
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
+
x86_64-debian-10:
extends: .native_build_job
@@ -459,6 +469,10 @@ x86_64-fedora-34:
allow_failure: false
variables:
NAME: fedora-34
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
x86_64-fedora-35:
@@ -468,6 +482,10 @@ x86_64-fedora-35:
allow_failure: false
variables:
NAME: fedora-35
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
x86_64-fedora-rawhide:
diff --git a/ci/manifest.yml b/ci/manifest.yml
index 1cc589955c..2aba242948 100644
--- a/ci/manifest.yml
+++ b/ci/manifest.yml
@@ -21,10 +21,19 @@ targets:
centos-stream-8:
jobs:
- arch: x86_64
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
centos-stream-9:
jobs:
- arch: x86_64
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
+
debian-10:
jobs:
- arch: x86_64
@@ -126,11 +135,21 @@ targets:
- arch: s390x
allow-failure: true
- fedora-34: x86_64
+ fedora-34:
+ jobs:
+ - arch: x86_64
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
fedora-35:
jobs:
- arch: x86_64
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - libvirt-rpms
- arch: mingw32
allow-failure: true
--
2.34.1
On Mon, Jan 31, 2022 at 07:01:00PM +0100, Erik Skultety wrote: > We're already building libvirt in the containers already, You already used "already" in this sentence already ;) > if we publish > the build in form of, say, RPMs, No need to be vague - we're publishing them *exactly* as RPMs. > +++ b/.gitlab-ci.yml > @@ -30,7 +30,8 @@ include: '/ci/gitlab.yml' > - meson dist -C build --no-tests > - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip"; > then > - rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz; > + rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta build/meson-dist/libvirt-*.tar.xz; > + mv rpmbuild/RPMS/x86_64 libvirt-rpms ; No whitespace before ";" please. I'd also like to have "/" at the end of each directory name to make it obvious that we're moving around directories rather than files. > +++ b/ci/gitlab.yml > @@ -407,6 +407,11 @@ x86_64-centos-stream-8: > allow_failure: false > variables: > NAME: centos-stream-8 > + artifacts: > + expire_in: 1 day > + paths: > + - libvirt-rpms > + > > x86_64-centos-stream-9: > extends: .native_build_job This looks like it's adding additional empty lines, and if you regenerate the file using 'lcitool manifest' you'll find that they get removed. But they are actually supposed to be there, and the fact that they aren't is a bug in lcitool. https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/226 -- Andrea Bolognani / Red Hat / Virtualization
On Mon, Jan 31, 2022 at 07:01:00PM +0100, Erik Skultety wrote: > We're already building libvirt in the containers already, if we publish > the build in form of, say, RPMs, later stages of the pipeline can > consume the RPMs instead of re-building libvirt from scratch. > > Signed-off-by: Erik Skultety <eskultet@redhat.com> > --- > .gitlab-ci.yml | 3 ++- > ci/gitlab.yml | 18 ++++++++++++++++++ > ci/manifest.yml | 21 ++++++++++++++++++++- > 3 files changed, 40 insertions(+), 2 deletions(-) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
© 2016 - 2026 Red Hat, Inc.