Skip to content

Cancel pending or running pipelines when a new pipeline runs on the same branch

Dunja Lalic requested to merge dlalic/librsvg:cancel_outdated_jobs into master

What I personally find as a nuisance is when I push another commit to a branch, the pipeline for previous commit(s) keeps running and I have to go and stop it by hand as it's most often pointless for it to continue running. It's possible to make it automatically cancel, quote from the documentation:

You can set pending or running pipelines to cancel automatically when a new pipeline runs on the same branch. You can enable this in the project settings:

  1. Go to Settings > CI / CD.
  2. Expand General Pipelines.
  3. Check the Auto-cancel redundant, pending pipelines checkbox.
  4. Click Save changes. Note that only jobs with interruptible set to true are cancelled.

https://gitlab.com/help/ci/pipelines/settings#auto-cancel-pending-pipelines

Merge request reports