I have a very basic Gitlab CICD yaml file that is supposed to run two jobs on completion of another job. I'd like one job to automatically set a variable, while the other job prompts the user to define one. These jobs are called auto
and manual
respectively. However, when I run the file below, the manual
step just doesn't set anything and continues to run without prompting the user for variables. This does make sense, but how exactly do I force this job to prompt the user for variable definitions?
stages:
- A
- B
.template
script:
- echo ${MY_VARIABLE}
setup:
stage: A
script:
- echo "do nothing yet"
allow_failure: false
when: manual
auto:
stage: B
variables:
MY_VARIABLE: "I am automatically set"
when: on_success
dependencies:
- setup
manual:
stage: B
when: manual
dependencies:
- setup
Currently, the above results in:
auto
output
I am automatically set
manual
output
UPDATE: It doesn't look like there is a way to force the above.