Loading
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-cirule:when: neverfor 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 CIlabel is cased to match the existingAllow API ABI Breaklabel.
- The
- Jobs that should be skippable reference
*reduced-ciexplicitly in theirrules, alongside*manual-on-draftwhere they need both — the skip logic is not baked into the.manual-on-draftanchor. pre-commitanddoxygen-documentationcarry 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)
Edited by Yury Matveev