CI/CD component `specs.inputs` ignored when using local includes
Summary
CI/CD component specs.inputs
ignored when using local includes
Steps to reproduce
- Have a CI/CD component
templates/component1.yml
that has inputs:
spec:
inputs:
my-input:
default: default value
---
my-job:
script:
- echo "$[[ inputs.my-input ]]"
- Have a meta CI/CD
meta.yml
component that includes a bunch of other components, including them as local files (as recommended in the documentation):
spec:
inputs:
my-input:
default: default value
---
include:
- local: '/templates/component1.yml'
- local: '/templates/component2.yml'
- local: '/templates/component3.yml'
- Include the meta component in another project:
include:
- component: gitlab.com/group/project/meta@~latest
inputs:
my-input: something else
What is the current bug behavior?
my-job
prints default value
What is the expected correct behavior?
my-job
should print something else
Workaround
The meta component can use an include again to get the correct behaviour:
spec:
inputs:
my-input:
default: default value
---
include:
- component: gitlab.com/group/project/component@~latest
inputs:
my-input: "$[[ inputs.my-input ]]"
- local: '/templates/component2.yml'
- local: '/templates/component3.yml'