Skip to content

Add raw support for sending trigger variables

Furkan Ayhan requested to merge 353991-fa-ci-variables-expand-raw-logic-3 into master

What does this MR do and why?

This MR adds the expand/raw support for variables forwarded by trigger jobs.

Step Status
Add expand syntax to CI config !98420 (merged)
Implement expand/raw logic for basic jobs !102536 (merged)
Add QA test for raw variables in CI config YAML !103181 (merged)
Use expand/raw logic for variables passed by bridge/trigger <- HERE
Add documentation and CI schema for expand/raw !103313 (merged)

Related to #353991 (closed)

Screenshots or screen recordings

Configs

# .gitlab-ci.yml

child:
  variables:
    VAR1: "PROJECTID-$CI_PROJECT_ID"
    VAR2: "PIPELINEID-$CI_PIPELINE_ID and $VAR1"
    VAR3:
      value: "PIPELINEID-$CI_PIPELINE_ID and $VAR1"
      expand: false
  trigger:
    include: .child-pipeline.yml
# .child-pipeline.yml

child_test:
  script:
    - echo $VAR1
    - echo $VAR2
    - echo $VAR3

Before enabling ci_raw_variables_in_yaml_config

Screenshot_2022-11-07_at_13.52.35

After enabling ci_raw_variables_in_yaml_config

Screenshot_2022-11-07_at_13.53.32

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