Hi all -
I have a job that needs to execute a groovy pre- step that sets a global
environment variable.
Is there anyway to do this?
I have tried the following:
for (nodeproperty in hudson.model.Hudson.instance.globalNodeProperties)
{
println(nodeproperty.getEnvVars());
nodeproperty.getEnvVars().put("FOO", nextdevversion);
hudson.model.Hudson.instance.save();
println(nodeproperty.getEnvVars());
}
and then set:
nextdevversion=NEXT_DEV_VERSION
In the variable bindings - but that just set the global environment
variable to "NEXT_DEV_VERSION".
I've tried:
${NEXT_DEV_VERSION}
$NEXT_DEV_VERSION
${env.NEXT_DEV_VERSION}
None of these are the actual parameter.
Is this just not possible?