At this moment I defined a environment variable called GLOBAL_VAR with the value \'test\' under Manage Jenkins -> Configure System -> Global Properties. I have a shell script wh
Does anyone know how to access the Jenkins environment variables in groovy?
I can provide an example from a Jenkins job we use. The job is parameterized and provides the user with the ability to set many values, one of which is "InstallVersion" (default value is -1). Additionally, we set up an environment variable called "JENKINS_TRUNK_LABEL". I won't go into specifics about this job, but, here's how we refer to "JENKINS_TRUNK_LABEL" within a Groovy script.
if (InstallVersion == "-1")
{
InstallVersion = "$JENKINS_TRUNK_LABEL"
}