Skip to content

Commit

Permalink
Merge interruptible Gitlab CI
Browse files Browse the repository at this point in the history
This PR makes Gitlab CI Interruptible. CI on the master/develop branch cannot be interrupted. It seems that the interrupt doesn't work on force pushes.
  • Loading branch information
MarcelKoch authored Jul 11, 2023
2 parents d60b02c + d7bdec1 commit 2e0f4ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ include:
- local: '.gitlab/rules.yml'
- local: '.gitlab/scripts.yml'
- local: '.gitlab/variables.yml'
# This is a workaround to conditionally make the branch pipelines
# interruptible, because the flag does not directly support rules [1].
#
# [1] https://gitlab.com/gitlab-org/gitlab/-/issues/194023#note_1225906002
- local: '.gitlab/add-interrupt.yml'
rules:
- if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "develop" && CI_COMMIT_TAG !~ /^v\d+\.\d+\.\d+/

sync:
stage: sync
Expand Down Expand Up @@ -812,6 +819,7 @@ sonarqube_cov:
# Deploy documentation to github-pages
gh-pages:
stage: deploy
interruptible: false
extends:
- .default_variables
- .deploy_condition
Expand Down Expand Up @@ -915,6 +923,7 @@ cudamemcheck:

new-issue-on-failure:
stage: on-failure
interruptible: false
extends:
- .default_variables
- .use_status-job-settings
Expand Down
2 changes: 2 additions & 0 deletions .gitlab/add-interrupt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
default:
interruptible: true

0 comments on commit 2e0f4ea

Please sign in to comment.