No such property: it for class: Script1

308 views
Skip to first unread message

Geo Palassery

unread,
May 23, 2017, 4:16:23 AM5/23/17
to jenkins...@googlegroups.com
We are also the error when we use email ext plugin with ${SCRIPT, template="SquishSummary.groovy"} as in Pre-send script. Its already discussed on this thread https://issues.jenkins-ci.org/browse/JENKINS-33468

groovy.lang.MissingPropertyException: No such property: it for class: Script1
{{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)}}
{{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)}}
{{ ......}}


Please see the relevant part of SquishSummary.groovy

List resultFiles = []
{{ def summaries = new XmlSlurper().parse( summaryFile )}}
{{ summaries.summary.each {}}
{{ resultFiles.push( new File( squishResultsPath, it.xmlFileName.text() ) )}}
{{ }}}


Please let me know what we need to change for this.

We tried as resultFiles.push( new File( squishResultsPath, { File -> .FilexmlFileName.text() } ) )

But its not working. Can you please help?

Thanks

Reply all
Reply to author
Forward
0 new messages