Issue Type: Bug Bug
Affects Versions: current
Assignee: vjuranek
Components: groovy
Created: 12/Mar/13 11:21 AM
Description:

Hi,

I've been happily using the Groovy plugin 1.12 to execute some complex code in the macro expansion.

Unfortunately, in 1.13 it does not work anymore. This is what I get in the output of a job:

FATAL: null
java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:542)
	at groovy.lang.Binding.setVariable(Binding.java:77)
	at groovy.lang.GroovyShell.setVariable(GroovyShell.java:568)
	at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:76)
	at hudson.plugins.groovy.GroovyTokenMacro.evaluate(GroovyTokenMacro.java:68)
	at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:177)
	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:177)
	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:153)
	at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.setDisplayName(BuildNameSetter.java:50)
	at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.setUp(BuildNameSetter.java:37)
	at hudson.model.Build$BuildExecution.doRun(Build.java:154)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:593)
	at hudson.model.Run.execute(Run.java:1567)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:237)

For the test I used the Build Name Setter plugin with the option

${GROOVY,script="return 'build_name'"}

but the failure is reproducible with anything that call token expansion and with any Groovy code (I use something more complex than that in my real jobs).

To be able to work I had to revert 1.12, but I would profit from the change in 1.13 because I actually need to manipulate an environment variable in the token.

Thanks
Marco

Project: Jenkins
Priority: Blocker Blocker
Reporter: Marco Clemencic
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

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to