Skip to content

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 or ReleaseNotes.md
  • Changes in sonarcloud config
  • Changes in .gitlab issue templates
  • etc...

Solution

Gitlab has an option to skip the CI pipeline:

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?