CI: Limit pipeline to pre-commit on [REDUCED CI] MR title and/or Reduced CI label

Limit the CI pipeline to only the pre-commit and doxygen-documentation jobs when the merge request opts in, either via a case-sensitive [REDUCED CI] marker in the title or a Reduced CI label.

What

  • New reusable .reduced-ci rule: when: never for a job when $CI_MERGE_REQUEST_IID && ($CI_MERGE_REQUEST_TITLE =~ /\[REDUCED CI\]/ || $CI_MERGE_REQUEST_LABELS =~ /Reduced CI/).
    • The [REDUCED CI] title marker is case-sensitive, so it is clear something magic is going on.
    • The Reduced CI label is cased to match the existing Allow API ABI Break label.
  • Jobs that should be skippable reference *reduced-ci explicitly in their rules, alongside *manual-on-draft where they need both — the skip logic is not baked into the .manual-on-draft anchor.
  • pre-commit and doxygen-documentation carry no skip rule, so they still run (the documentation stays browsable via its environment even on reduced-CI MRs).
  • Tag / default-branch-only jobs are unaffected (rule guarded by $CI_MERGE_REQUEST_IID).

Relies on GitLab flattening nested rule arrays, already used by - *manual-on-draft.

Closes #1687 (closed)

🤖 Generated with Claude Code

Edited by Yury Matveev

Merge request reports

Loading
Loading