Skip to content

Backend: Support conditional includes with changes like `include:rules:changes`

Release notes

WIP

Problem to solve

Today it is possible to use rules:if as part of include blocks in pipelines. This is great but doesn't expose the full power of rules available with other keywords, such as exists.

Proposal Allow the changes keywords to be used as part of an include:rules block:


include:
  - local: builds_docker.yml
    rules:
      - changes:
          - Dockerfile

test:
  stage: test
  script: exit 0

Implementation

Step 1: Refactor External::Rules class to utilize Entry::Include::Rules. After the refactor, it will be significantly easier to add new subkeys to include:rules and avoid redefining the existing validations in the Entry classes.

Step 2: Add support for include:rules:changes.

Description MR / Issue
Refactor CI External::Rules to utilize Entry::Include::Rules validations !129145 (merged)
[Feature flag] Roll out ci_refactor_external_rules #421731 (closed)
Support CI config include:rules:changes !129866 (merged)
[Feature flag] Roll out ci_support_include_rules_changes #421608 (closed)
Edited by Leaminn Ma