No need for recursion :)
Actually I tried using new File() firstly, but Jenkins sandbox seems 
prevent calling to new File() (and new DateTime(), etc.)
Moreover, as the docs for FilePath says:
Unlike File 
<http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true>
, which always implies a file path on the current computer, FilePath 
<http://javadoc.jenkins-ci.org/hudson/FilePath.html> represents a file path 
on a specific agent or the master
I assume using FilePath is preferred


On Friday, August 26, 2016 at 12:48:30 AM UTC+7, [email protected] wrote:
>
> Not sure if you need recursion or not but:
>
> new File(".").eachDir() { it -> println it.getAbsolutePath() } 
> new File(".").eachFileRecurse() { it -> println it.getAbsolutePath() } 
>
> I had many problem with iterator into JenkinsFile where only the first 
> match ever get executed. But if your bash script work you still can leave 
> it there and simply call it with 
> sh "myscript.sh"
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b5825313-c93a-407c-b398-9662bbbe01b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to