Allow CI to be skipped
Problem
We had decided to make merge requests into main
mandatory. These MRs can only be completed after the CI runners have finished successfully.
This is a good practice. However, there are scenarios where the CI adds no value (mostly documentation or some gitlab config changes). In these cases, we are just consuming CPU (and time!) resources without any benefit.
Some examples:
- Changes in
README
orReleaseNotes.md
- Changes in sonarcloud config
- Changes in
.gitlab
issue templates - etc...
Solution
Gitlab has an option to skip the CI pipeline:
- https://openstack.cern.ch/hzrequests/
- https://repository.prace-ri.eu/git/help/user/project/push_options.md#push-options-for-gitlab-cicd
This can be enabled on the gitlab project configurations.
It allows us to skip the CI every time a commit is pushed with [ci skip]
or [skip ci]
in the commit message, or with the option -o ci.skip
/--push-option=ci.skip
.
Discussion
- Should we be able to bypass the CI?
- On which scenarios are we allowed to bypass the CI?