The Hoof & Paw
DocsCategoriesTagsView the current conditions from the WolfspyreLabs WeatherstationToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Using Workflow Rules in gitlab-ci

Workflow rules in Gitlab-CI

I got frustrated that certain jobs would pop off multiple times as a hunk of work was evaluated.

I looked at the docs1; specifically this. and found it fairly easy to simply declare a set of rules to apply to the entire ci declaration.

I’m sure I’ll want to improve this later, but this will work for now.

1
2
3
4
5
workflow:
  rules:
    - if: $CI_COMMIT_MESSAGE =~ /-draft$/
      when: never
    - if: $CI_PIPELINE_SOURCE == "push"