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-33468groovy.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?