I want to set some jenkins environment variables in run time based on my computation. How can i set this run-time in my jenkinsfile's step
section.
for example: based on my calculation i get abc=1
. How can i set this in real time in my jenkinsfile's step
section so that i can use it later by calling $abc
.
I am declaring my pipeline and environment variables as explained here: https://jenkins.io/doc/pipeline/tour/environment/
i'm using Jenkins ver. 2.41
Here an example how to set variables and use it in the same Jenkinsfile. The Variable versionToDeploy will be used by the
build job
step.