Skip to content

Add rules support for CI pipeline include

Furkan Ayhan requested to merge 276515-include-rules into master

What does this MR do?

This MR adds the support of include:rules:if.

It's behind a feature flag ci_include_rules (#337507 (closed))

Related to #276515 (closed)

Screenshots or Screencasts (strongly suggested)

Normal run

Screen_Shot_2021-08-03_at_14.32.17

Adding the variable

Screen_Shot_2021-08-03_at_14.30.33

Run again

Screen_Shot_2021-08-03_at_14.30.45

How to setup and validate locally (strongly suggested)

Example below:

  1. Enable the feature flag
    Feature.enable(:ci_include_rules)
  2. Use include:rules:if
    include:
      - local: builds.yml
        rules:
          - if: '$INCLUDE_BUILDS == "true"'
      - local: lints.yml
    
    test:
      stage: test
      script: exit 0
  3. Run pipelines with and without having INCLUDE_BUILDS as a project variable.

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Furkan Ayhan

Merge request reports

Loading