From: Michael Hofmann <mhofmann(a)redhat.com>
Auto-cancel pipelines only on MRs
The interruptible keyword determines whether pipelines can be
auto-cancelled.
For kernel testing pipelines, this should only be done for MRs. Baseline
pipelines on ark-latest shouldn't cancel but run to completion.
For all other non-MR pipelines (scheduled/HEAD os-build), these should
also not be cancelled.
Therefore, use a conditional include to only configure jobs to be
interruptible in MR pipelines.
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index blahblah..blahblah 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,15 +9,16 @@ include:
- project: cki-project/pipeline-definition
ref: production
file: kernel_templates.yml
+ - project: cki-project/cki-lib
+ ref: production
+ file: .gitlab/ci_templates/interruptible.yml
+ if: $CI_PIPELINE_SOURCE == "merge_request_event"
stages:
- test
- build
- deploy
-default:
- interruptible: true
-
workflow:
rules:
# ARK release pipelines
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2598