Is it possible to create an environment variable referring to another existing environment variable in a pipeline definition? I use the Groovy configuration plugin and would like to do something like this:
stage('Build') {
environmentVariables = [
IMAGE_TAG: "$GO_REVISION-$GO_PIPELINE_COUNTER"
]
...
The variables must be resolved at runtime, not ath the time of creating the configuration. Is this possible at all? In all my attempts I only get errors like
"No such property: GO_REVISION for class: cd.go.contrib.plugins.configrepo.groovy.dsl.Stage"
The only workaround I see is to set environment variables directly in the bash string before executing the actual bash commands but then this has to be done for every bash task and I don't quite like it.