Skip to content

Draft: Support `!reference` tag in CI interpolation

Leaminn Ma requested to merge ci-interpolation-support-reference-tag into master

What does this MR do and why?

Given:

spec:
  inputs:
    job_name:
      default: 'test'
---
test:
  script: echo
  rules:
    - if: $TEST_VAR

build:
  script: echo
  rules: !reference ["$[[inputs.job_name]]", "rules"]

Full configuration output:

---
test:
  script: echo
  rules:
  - if: "$TEST_VAR"
build:
  script: echo
  rules:
  - if: "$TEST_VAR"

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Related to #424481

Edited by Leaminn Ma

Merge request reports