Hello,
I modified the script to use FilePath (since the job runs on a remote agent and, from my understanding, the groovy script is executed on master) -
here's the updated gist
When run from Scriptler, I get the following error:
[(master)]:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 38: The class 'FileSearch' has an incorrect modifier static.
@ line 38, column 1.
private static class FileSearch implements FileCallable {
^
Script1.groovy: 38: The class 'FileSearch' has an incorrect modifier private.
@ line 38, column 1.
private static class FileSearch implements FileCallable {
^
2 errors
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
at groovy.lang.GroovyShell.parse(GroovyShell.java:736)
at groovy.lang.GroovyShell.parse(GroovyShell.java:727)
at org.jenkinsci.plugins.scriptler.util.GroovyScript.call(GroovyScript.java:117)
at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
at org.jenkinsci.plugins.scriptler.util.ScriptHelper.runScript(ScriptHelper.java:124)