aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.d/base.yml
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2022-05-27 16:36:01 +0100
committerAlex Bennée <alex.bennee@linaro.org>2022-06-01 15:47:43 +0100
commite312d1fdbbb3a53ee30ab84203344588154129f9 (patch)
tree71a306663123aa5886c05885af9ae9b67db2e27e /.gitlab-ci.d/base.yml
parent16fee101d9011ea5dfd56a055d19df802e59eb29 (diff)
downloadqemu-e312d1fdbbb3a53ee30ab84203344588154129f9.zip
qemu-e312d1fdbbb3a53ee30ab84203344588154129f9.tar.gz
qemu-e312d1fdbbb3a53ee30ab84203344588154129f9.tar.bz2
gitlab: convert build/container jobs to .base_job_template
This converts the main build and container jobs to use the base job rules, defining the following new variables - QEMU_JOB_SKIPPED - jobs that are known to be currently broken and should not be run. Can still be manually launched if desired. - QEMU_JOB_AVOCADO - jobs that run the Avocado integration test harness. - QEMU_JOB_PUBLISH - jobs that publish content after the branch is merged upstream As build-tools-and-docs runs on master we declare the requirement of building amd64-debian-container optional as it should already exits once we merge. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220526110705.59952-5-berrange@redhat.com> [AJB: fix upstream typo, mention optional container req] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220527153603.887929-32-alex.bennee@linaro.org>
Diffstat (limited to '.gitlab-ci.d/base.yml')
-rw-r--r--.gitlab-ci.d/base.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml
index e6953c7..4f091d5 100644
--- a/.gitlab-ci.d/base.yml
+++ b/.gitlab-ci.d/base.yml
@@ -16,10 +16,22 @@
- if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == "" || $CIRRUS_API_TOKEN == "")'
when: never
+ # Publishing jobs should only run on the default branch in upstream
+ - if: '$QEMU_JOB_PUBLISH == "1" && $CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
+ when: never
+
+ # Non-publishing jobs should only run on staging branches in upstream
+ - if: '$QEMU_JOB_PUBLISH != "1" && $CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/'
+ when: never
+
# Jobs only intended for forks should always be skipped on upstream
- if: '$QEMU_JOB_ONLY_FORKS == "1" && $CI_PROJECT_NAMESPACE == "qemu-project"'
when: never
+ # Avocado jobs don't run in forks unless $QEMU_CI_AVOCADO_TESTING is set
+ - if: '$QEMU_JOB_AVOCADO && $QEMU_CI_AVOCADO_TESTING != "1" && $CI_PROJECT_NAMESPACE != "qemu-project"'
+ when: never
+
#############################################################
# Stage 2: fine tune execution of jobs in specific scenarios
@@ -31,6 +43,16 @@
when: manual
allow_failure: true
+ # Skipped jobs should not be run unless manually triggered
+ - if: '$QEMU_JOB_SKIPPED'
+ when: manual
+ allow_failure: true
+
+ # Avocado jobs can be manually start in forks if $QEMU_CI_AVOCADO_TESTING is unset
+ - if: '$QEMU_JOB_AVOCADO && $CI_PROJECT_NAMESPACE != "qemu-project"'
+ when: manual
+ allow_failure: true
+
#############################################################
# Stage 3: catch all logic applying to any job not matching