Cancel pending or running pipelines when a new pipeline runs on the same branch
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:
- Go to Settings > CI / CD.
- Expand General Pipelines.
- Check the Auto-cancel redundant, pending pipelines checkbox.
- 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