Merge branch 'andrey-add-interruptible' into 'master'

Add redundant pipeline cancelation

See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/609

Merged-by: Rémy Coutable <remy@rymai.me>
Approved-by: Rémy Coutable <remy@rymai.me>
Co-authored-by: Andrejs Cunskis <acunskis@gitlab.com>
This commit is contained in:
Rémy Coutable 2022-11-10 10:11:10 +00:00
commit 4af3119f5c
2 changed files with 16 additions and 0 deletions

View file

@ -8,6 +8,7 @@ workflow:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
default:
interruptible: true
image: ${BASE_BUILD_REGISTRY_IMAGE}/debian-bullseye-slim:docker-20.10.14-buildx-0.8
services:
- docker:20.10.14-dind
@ -28,5 +29,8 @@ variables:
DOCKER_HOST: tcp://docker:2375
BASE_BUILD_REGISTRY_IMAGE: registry.gitlab.com/gitlab-org/gitlab-build-images
dont-interrupt-me:
extends: .dont-interrupt-me
cache-chrome-chromium:
extends: .cache-google-chrome

View file

@ -68,3 +68,15 @@
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_SERVER_HOST == "gitlab.com"'
when: manual
allow_failure: true
.dont-interrupt-me:
stage: .pre
interruptible: false
script:
- echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible."
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
allow_failure: true
- if: $CI_MERGE_REQUEST_IID
when: manual
allow_failure: true