Allow $(command) syntax for variable declerations
Description
As of now the .gitlab-ci.yml doesn't support setting job or gobal variables to command outputs.
For example:
.pkg-project_tmpl: &pkg-project_tmpl
stage: package
script:
# Package with $VERSION as version
# ...
- echo $VERSION
pkg-project:
<< *pkg-project_tmpl
variables:
# get_version.sh outputs the version found for this project
VERSION=$(get_version.sh)
Will yield:
(echo '1.0')
Instead of:
1.0
The example is an use case at the same time.
Proposal
I propose that the $(command) syntax should be added to variable declarations in the .gitlab.yml. So their values can be dynamically determined.
Links to related issues and merge requests / references
None that I know of.