Pre-filled CI/CD variables feature is not working correctly for child pipeline
Summary
The default value for pre-filled CI/CD variable is not replaced by the new value specified during the pipeline run.
Steps to reproduce
- Create a pipeline with predefined variable with some default value
- Add child pipeline
- Specify new (custom) value during manual pipeline run
- Check and compare the variable values for both pipelines - parent and child
Example Project
https://gitlab.com/vvintoniak/pre-filled-variables-bug/-/pipelines/261220763
What is the current bug behavior?
For child pipeline:
$ echo "VARIABLE value is $VARIABLE" VARIABLE value is DEFAULT
What is the expected correct behavior?
For child pipeline:
$ echo "VARIABLE value is $VARIABLE" VARIABLE value is CUSTOM
Workaround
Redefine the variable during child pipeline triggering:
child-trigger:
stage: trig
variables:
VARIABLE: $VARIABLE
Edited by Vitalii