Fix error when using array for the project keyword
What does this MR do and why?
When you use an array in the project
keyword for include
, like so:
include:
- project: ["lauraX/public-project"]
file: test.yml
ref: master
test:
script: echo hello
and you use a masked variable, Ci::MaskSecret
throws an error because it's trying to gsub
an array.
As a temporary fix, we will force the array into a string. For a permanent fix, we will validate that the project
keyword use only a string. Issue: TBD
Screenshots or screen recordings
Before | After |
---|---|
NO PIPELINE FOR YOU | Pipeline |
How to set up and validate locally
- Define a config with an
include:project
defined in an array:
# public-project
include:
- project: ["lauraX/included-project"]
file: test.yml
ref: master
test:
script: echo hello
Issue: #360624 (closed)
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.
Edited by Laura Montemayor