Issue Type: Bug Bug
Affects Versions: current
Assignee: Gregory Boissinot
Components: envinject
Created: 06/Aug/12 7:34 AM
Description:

I try to inject last successfull build revision into env vars with Groovy script. It runs successfully in Jenkins execution console, but fails inside job run.

[jenkins] $ cmd /c call C:\Windows\TEMP\hudson5593478547391954761.bat
C:\Dev\HG\jenkins>exit 0
[EnvInject] - Script executed successfully.
[EnvInject] - Evaluation the following Groovy script content:
import hudson.plugins.mercurial.MercurialTagAction

def lastStableBuild = Jenkins.instance.getItem($JOB_NAME).getLastStableBuild()
if (lastStableBuild == null){ return null; }

def mercurialAction = lastStableBuild.getAction(MercurialTagAction)
if (mercurialAction == null){ return null; }
}
def lastSuccessRev = [LAST_SUCCESS_REVISION: mercurialAction.getRev()]
return lastSuccessRev

[EnvInject] - [ERROR] - SEVERE ERROR occurs: startup failed:
Script1.groovy: 1: unable to resolve class hudson.plugins.mercurial.MercurialTagAction
@ line 1, column 1.
import hudson.plugins.mercurial.MercurialTagAction
^

1 error

Project: Jenkins
Priority: Major Major
Reporter: Peter S
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