Fix CI text interpolation variable validation
What does this MR do and why?
CI text interpolation is causing variable values to be validated as in their actual type. Before, they were being validated after being cast to a string. This causes errors when running pipelines because the alphanumeric validator used for variable values only considered strings, symbols, and integers to be valid. This commit updates the validator to consider floats and booleans valid as well.
Before | After |
---|---|
How to set up and validate locally
-
Make sure the
ci_text_interpolation
flag is enabled:Feature.enable(:ci_text_interpolation)
-
In the CI editor, place this config:
variables: FLOAT_VAR: 9.9 FALSE_VAR: false TRUE_VAR: true test_job: script: ls
-
See that the syntax is valid
🎉
Related to #439272 (closed)