[ https://issues.jenkins-ci.org/browse/JENKINS-14058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163702#comment-163702 ]
Gregory Boissinot commented on JENKINS-14058: --------------------------------------------- WORKSPACE envrionment variable is a special case. ScriptTrigger runs in a context outside of the job. It is not supposed to access to the WORKSPACE elements. WORSPACE elements in Jenkins represents a set of isolated elements for the current build. If build 1 runs on master, there is a dedicated workspace and if the build 2 runs a slave node, the WORKSPACE is often different (often relative to node location). In this context, it is difficult to access WORKSPACE elements from a process aimed at deciding to schedule a build or not. Which is your use case? > WORKSPACE VARIABLE is not enabled > --------------------------------- > > Key: JENKINS-14058 > URL: https://issues.jenkins-ci.org/browse/JENKINS-14058 > Project: Jenkins > Issue Type: Improvement > Components: scripttrigger > Affects Versions: current > Environment: RHEL 5 64 BITS > Reporter: Victor Martinez > Assignee: Gregory Boissinot > > environment variables for the job (JOB_NAME, WORKSPACE, etc) should be > available to the script according to the version 0.9, but I cannot see the > workspace variable: > Polling for the job AP_2.5_2 > Looking nodes where the poll can be run. > Looking for a candidate node to run the poll. > Looking for a polling node with the assigned project label ubuntu&&test. > Polling remotely on rbm-83 > The expected script execution code is 0 > Evaluating the script: > env > [jenkins] $ /bin/sh -xe /tmp/hudson4842223712068824960.sh > + env > HOME=/var/bob-home > HUDSON_COOKIE=64bc14ec-7466-419f-8a53-23c21cd1cf11 > HUDSON_HOME=/storage/tools/jenkins/.jenkins > HUDSON_SERVER_COOKIE=66cfbe25f08f4d76d41fbb169f0fe20e > JENKINS_HOME=/storage/tools/jenkins/.jenkins > JENKINS_SERVER_COOKIE=66cfbe25f08f4d76d41fbb169f0fe20e > JOBS_URL=http://rbm-13:2020/jenkins/job > JOB_NAME=AP_2.5_2 > LANG=en_GB.UTF-8 > LOGNAME=bob > MAIL=/var/mail/bob > NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat > NODE_LABELS=cluster coverity linux rbm-83 test ubuntu > NODE_NAME=rbm-83 > PATH=/usr/kerberos/bin:/usr/local/sbin > PWD=/storage/jenkins > SHELL=/bin/bash > SHLVL=2 > SSH_CLIENT=172.xx.xx.XXX XXXXX 22 > SSH_CONNECTION=172.XXX.XXX.XXX YYYYY 172.XXX.XXX.XXX 22 > TMPDIR=/tmp > USER=bob > XDG_SESSION_COOKIE=b81ba24ca526785bb3ed28804f0f1f97-1338544823131.856266-1065288812321 > XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt > _=/usr/bin/env > The exit code is '0'. > Testing if the script execution code returns '0'. > Polling complete. Took 44 ms. > Changes found. Scheduling a build. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira