Update CI schema to support `!reference`"
What does this MR do and why?
Adds support for the custom yaml keyword !reference for variables, script and rules.
Screenshots or screen recordings
| header | header |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Setup your yaml file to use
!reference
.gen:
script: echo I am from gen
.vars:
variables:
URL: "http://my-url.internal"
IMPORTANT_VAR: "the details"
.cond:
script: echo hello
rules:
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^feature/
when: manual
allow_failure: true
build:
stage: "build"
script: !reference [.gen, script]
test:
stage: "test"
variables: !reference [.vars, variables]
script: echo $IMPORTANT_VAR
rules: !reference [.cond, rules]
- Make sure you don't see any linting error
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
relates to #348666 (closed)
Edited by Frédéric Caplette

