Hello,
I鈥檓 trying to set a variable that has the value of another variable or a default value in the ci.
The defaulting mechanism seems to work fine with : ${MY_VAR:-my-value}
But when trying to store the result at the pipeline (or workflow?) level, I can鈥檛 acces the new variable
here鈥檚 the smallest way to reproduce: .gitlab-ci.yml 路 main 路 Xavier Bouvard / bug-in-ci 路 GitLab
variables:
MY_VAR: ${CI_COMMIT_TAG:-0.0.0}
test:
script:
- echo ${CI_COMMIT_TAG:-0.0.0}
- echo ${MY_VAR}
and the corresponding pipeline : test (#2802576383) 路 Jobs 路 Xavier Bouvard / bug-in-ci 路 GitLab
$ echo ${CI_COMMIT_TAG:-0.0.0}
1.0.0
$ echo ${MY_VAR}
Cleaning up project directory and file based variables 00:01
Job succeeded
I might be missing something either in the documentation or solutions from the forum so dont hesitate to send me the fine manual, I鈥檒l read it
regards