Leverage `interruptible` in GitLab's own pipelines
The interruptible
keyword allows GitLab to stop pipelines that are out of date, in order to save compute costs. I took a quick glance at our CI files, and couldn't see this being utilized.
For development branches, we should be using these as there is no real danger in aborting pipelines on out of date commits. This could save us a fair bit of money (of the 50-60K$ that we spent on GitLab.com shared runners each month, see https://app.periscopedata.com/app/gitlab/530329/WIP:-Infra-CI-Usage?widget=8077874&udv=0): https://docs.gitlab.com/ee/ci/yaml/#interruptible.
Proposal
For merge requests, cancel automatically pipelines except the latest one. If people want to not protect pipelines from being canceled, they can play the dont-interrupt-me
manual job.
For master
, the dont-interrupt-me
starts automatically as we want no master
pipelines to be canceled.
Validations
- MR canceled pipelines chart should go up: https://app.periscopedata.com/app/gitlab/496118/Engineering-Productivity-Sandbox?widget=8192946&udv=785399
- "GitLab.com shared runner estimated cost by project (for 'gitlab', 'gitlab-foss', 'gitlab-qa', 'gitlab-qa-mirror', 'CNG-mirror', 'omnibus-gitlab-mirror')" should go down: