Make it possible to skip CI when generating a new empty branch in the UI
At present, it is not possible to identify an "empty" branch -- that is, a branch with no new commits in it -- when deciding whether to run CI jobs. This could be very inefficient, resulting in deterministic tests (such as unit tests) running repeatedly on the same commit. It could also be expensive, using up CI minutes for unnecessary repeated runs.
Using Pipelines for Merge Requests helps here, but doesn't cover all the use cases.
#15170 (closed) deals with the question of how to identify "empty" branches in the CI logic, but in fact that appears to be impossible at present.
This issue recommends an alternative solution to some of the cases where this happens.
There are 2 cases that I know of where the GitLab UI explicitly creates a push with a new branch with no commits:
- The "New branch" button on the Branches page
- The "Create merge request" button on the Issue page
We use those buttons a lot in demos with customers, so there are pipelines (including full Auto Devops pipelines) being kicked off in those cases.
In this solution, we provide an option (so we don't break anything) to use the equivalent of [skip ci]
when using either of those buttons. It would address all of the occurrences of this phenomenon that I've encountered, and would reduce unnecessary consumption of CI runner minutes in many cases.
/cc @jyavorska @thaoyeager @marcel.amirault
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.