Hi, thanks for getting the changes in so quickly.

I also need to access build parameters and environment variables.
I am still learning about Jenkins and Groovy, but I have found I can access them with the following:

def thr = Thread.currentThread()
def build = thr.executable
// get build parameters
def buildVariablesMap = build.getBuildVariables()
// get all environment variables for the build
def buildEnvVarsMap = build.envVars

String jobName = buildEnvVarsMap?.JOB_NAME

Please advise if there is a better way to access this information

many thanks
Geoff

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to