]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
.gitlab-ci.yml: Add 'after_script' stage to prep for artifact collection
authorErik Skultety <eskultet@redhat.com>
Wed, 1 Feb 2023 10:11:32 +0000 (11:11 +0100)
committerErik Skultety <eskultet@redhat.com>
Tue, 12 Sep 2023 09:36:03 +0000 (11:36 +0200)
This is one of the preparation steps that if not done would otherwise
collide with local container executions where we:
1) don't collect artifacts
2) are not limited by GitLab's environment and hence moving build
   artifacts to unusual places would only cause confusion when doing
   local build inspection in an interactive container shell session

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
.gitlab-ci.yml

index 944a7b7817f02dece351ca30416420ca97a9833f..1c6af8f8b377d216f41ab27312e3f073e21bb6b3 100644 (file)
@@ -31,11 +31,16 @@ include:
     - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
       then
         rpmbuild --clean --nodeps --define "_without_mingw 1" -ta build/meson-dist/libvirt-*.tar.xz;
-        mv "$HOME"/rpmbuild/RPMS/x86_64/ libvirt-rpms/;
       else
         meson compile -C build;
         meson test -C build --no-suite syntax-check --print-errorlogs;
       fi
+  after_script:
+    - test "$CI_JOB_STATUS" != "success" && exit 1;
+    - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
+      then
+        mv "$HOME"/rpmbuild/RPMS/x86_64/ libvirt-rpms/;
+      fi
 
 .native_build_job_prebuilt_env:
   extends:
@@ -77,6 +82,8 @@ include:
     - *script_variables
     - meson setup build --werror -Dsystem=true || (cat build/meson-logs/meson-log.txt && exit 1)
     - DESTDIR=$(pwd)/install meson compile -C build install-web
+  after_script:
+    - test "$CI_JOB_STATUS" != "success" && exit 1;
     - mv install/usr/share/doc/libvirt/html/ website
   artifacts:
     expose_as: 'Website'
@@ -155,6 +162,8 @@ potfile:
     - meson setup build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
     - meson compile -C build libvirt-pot-dep
     - meson compile -C build libvirt-pot
+  after_script:
+    - test "$CI_JOB_STATUS" != "success" && exit 1;
     - cp po/libvirt.pot libvirt.pot
   artifacts:
     expose_as: 'Potfile'