Interruptible builds for redundant pipelines
What does this MR do?
When many pipelines are triggered (even on protected branches), GitLab should be able to automatically cancel redundant pipelines, even if the latter are already running.
With this MR, the goal is to introduce a new job keyword in the .gitlab-ci.yml
named interruptible
which will tell GitLab if a job is safe to be killed while it's running. Hence, when a new pipeline is created, any redundant pipeline already created (and started) will be cancelled if all the running or finished jobs are noted as interruptible. If any of the jobs are not interruptible, then the pipeline will be left to finish.
Closes gitlab#32022 (closed)
Proposal
The goal is to allow to configure any interruptible job like this:
build-master:
script: make
interruptible: true
With this keyword, it is possible to finely tune GitLab to let him know if any running redundant pipeline can be cancelled or not.
Related issues
Related MR
- !23172 (closed)
- https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9679
- https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15450
Previous implementations
- ctabin/gitlab-ce!1
- ctabin/gitlab-ce!2
General checklist
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides