In GitLab 18.1.0-pre 4a5e7cf522f
, I ran into this error:
Unable to create pipeline
`component.yml`: unknown input name provided: `313`
In the documentation we can find about this topic:
I do not see any mention anything that sound meaningful for this error.
The following MRE is a repo located here.
# .gitlab-ci.yml
include:
- project: $CI_PROJECT_PATH
ref: $CI_COMMIT_REF_NAME
file: component.yml
# component.yml
spec:
inputs:
313:
default: "Default"
---
job:
script:
- echo $[[ inputs.313 ]]
The pipeline result can be found here.
313
is deserialised as a number but in gitlab's microlanguage (i.e. echo $[[ inputs.313 ]]
) the 313
is interpreted as a string.
To fix this, you need to quote the input name:
.
# component.yml
spec:
inputs:
"313":
default: "Default"
---
job:
script:
- echo $[[ inputs.313 ]]
# .gitlab-ci.yml
include:
- project: $CI_PROJECT_PATH
ref: $CI_COMMIT_REF_NAME
file: component.yml
inputs:
"313": "Custom"
Notes that the include:inputs:"313:"
section names also require quotes.