Skip to content

Add support of pipeline variables to include

Furkan Ayhan requested to merge 337633-pipeline-variables-to-include into master

What does this MR do and why?

Related to #337633 (closed)

When we first implemented the usage of variables in include (#219065 (closed)), we only supported limited types of variables. We also supported to use these variables in include:rules (#276515 (closed)).

In this MR, we are adding the support of the following variables;

How to set up and validate locally

# .gitlab-ci.yml

include:
  - local: deploys.yml
    rules:
      - if: $CI_COMMIT_BRANCH == "main"

test:
  stage: test
  script: exit 0
# deploys.yml

deploy:
  stage: deploy
  script: echo deploy

Run in the feature branch;

Screen_Shot_2021-10-25_at_12.23.41

Run in the main branch;

Screen_Shot_2021-10-25_at_12.25.18

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Furkan Ayhan

Merge request reports

Loading