diff mbox series

[2/2] gitlab: don't run acceptance jobs if build jobs fail

Message ID 20210722162035.2765755-3-berrange@redhat.com (mailing list archive)
State New, archived
Headers show
Series gitlab: misc tweaks to job execution rules | expand

Commit Message

Daniel P. Berrangé July 22, 2021, 4:20 p.m. UTC
The 'when: always' clause tells gitlab to run the job even if the
dependant jobs have failed. This is wrong for the acceptance jobs,
since we need the build artifacts from the dependant jobs. This
results in the acceptance jobs given extra failures with wierd
messages about missing files.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.d/buildtest-template.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index 3e3e19d96b..fcbcc4e627 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -73,9 +73,9 @@ 
     # in its namespace setting or via git-push option, see documentation
     # in /.gitlab-ci.yml of this repository).
     - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
-      when: always
+      when: on_success
     - if: '$QEMU_CI_AVOCADO_TESTING'
-      when: always
+      when: on_success
     # Otherwise, set to manual (the jobs are created but not run).
     - when: manual
       allow_failure: true