Add !reference support for workflow keyword
What does this MR do and why?
In the workflow:rules keyword, we need to allow the use of the !reference
tag. So we add the accepted sub-type of the Ci JSON schema to accept an array of strings, which is what the !reference
tag expect.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Go to CI/CD editor
- Write any CI configuration file with the
!reference
tag inside the workflow:rules keyword. The simplest form would be:
.cond:
rules:
- if: '$FORCE_GITLAB_CI'
job1:
script: echo hello
rules:
- !reference [.cond, rules]
- Hover on the
!reference
tag - Notice there are no squiggly line!
🎉
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.