Skip to content

Interruptible builds for redundant pipelines

Cédric Tabin requested to merge (removed):issue-32741 into master

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

Previous implementations

  • ctabin/gitlab-ce!1
  • ctabin/gitlab-ce!2

General checklist

Merge request reports