|
||||||||
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 |
[JIRA] (JENKINS-14056) Run Groovy scripts from files and environment variables
jenk...@gcummings.com (JIRA) Mon, 18 Jun 2012 06:24:26 -0700
- [JIRA] (JENKINS-14056) Run Groovy scrip... dummy...@gmail.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... dummy...@gmail.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... gregory.boissi...@gmail.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... gregory.boissi...@gmail.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... dummy...@gmail.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... jenk...@gcummings.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... scm_issue_l...@java.net (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... b.ja...@gmail.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... jenk...@gcummings.com (JIRA)
- [JIRA] (JENKINS-14056) Run Groovy ... jenk...@gcummings.com (JIRA)
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