"yaml invalid" in case if `variables` is set to multiline key value
Summary
It's impossible to set variables
to key-value hash - always error 'yaml invalid' with message 'variables config should be a hash of key value pairs' is thrown.
Steps to reproduce
Just try to add this to .gitlab-ci.yml
:
variables:
GIT_STRATEGY: fetch
GIT_CHECKOUT: false
While it is one-liner (I mean, only one parameter is set) - it works. At the time you add another line - it is broken.
Example Project
https://gitlab.com/PatchRanger/bugshowcase-gitlab-36401
Here is the failed build with exact the same error message could be found: https://gitlab.com/PatchRanger/bugshowcase-gitlab-36401/pipelines .
What is the current bug behavior?
The pipeline is broken by YAML-validation, which is incorrect as aforementioned structure is valid YAML syntax.
What is the expected correct behavior?
Pipeline should pass YAML-validation and run.
Output of checks
As we are using Gitlab.com - it happens at gitlab.com.
Possible fixes
Looks like it is related to false
keyword: in case if I surround false
by quotes ("false"
) - it passes validation.