Re: Iterate FileWrapper, fails with shell script within the loop

2016-11-07 Thread Sverre Moe
Was aware of it. Iterating for loops using for(def foo : foos) will work for List. Using closure forEach does not work in Pipeline without using @NonCPS. > >- Beware for (Foo f: foos) loops and Groovy closure-style operators >like .each and the like. They will not work right in normal P

Re: Iterate FileWrapper, fails with shell script within the loop

2016-11-03 Thread 'Björn Pedersen' via Jenkins Users
And of course in methods marked as NonCPS, you can not use jenkins steps (e.g. sh). Björn -- 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 jenkinsci-users+uns

Re: Iterate FileWrapper, fails with shell script within the loop

2016-11-03 Thread 'Björn Pedersen' via Jenkins Users
See https://github.com/jenkinsci/pipeline-examples/blob/master/docs/BEST_PRACTICES.md#groovy-gotchas Am Montag, 31. Oktober 2016 12:22:08 UTC+1 schrieb Sverre Moe: > > Problem looping through the result of findFiles. > The result from this method returns a > org.jenkinsci.plugins.pipeline.uti