I'm not sure if workflow plugin is limiting iteration or not, I found it really odd...
I have this simple code...
def cdir = new File('.')
cdir.eachFileRecurse(FileType.FILES) { file ->
// or eachFile method
println file.getName()
}
When I execute the code on straight command line I get expected result, which is a list of files. However, the same code returns only first file name when executed inside a workflow job.
Is this an expected behavior?