P.S. I tried 
def currentChannel = env.build.workspace channel, and gets
"No such property: build for class: groovy.lang.Binding" error

any help towards the goal (list child directories) would be appreciated


On Thursday, August 25, 2016 at 11:31:24 AM UTC+7, Salvian Reynaldi wrote:
>
> I had a bash script that push some directories to AWS S3
>
>   for dir in */ ; do
>     "push.sh" "${dir::-1}"
>   done
>
> assuming the current directory is X, the script will push ./a/ and ./b/ 
> into s3://.../a/X and s3://.../b/X
>
> Now i'm trying to switch to Jenkinsfile. To traverse child directories 
> (like what the for loop basically did), the only method I found is using 
> FilePath.listDirectories 
> <http://javadoc.jenkins-ci.org/hudson/FilePath.html#listDirectories-->.
> But how do I create a FilePath object? available constructors need another 
> Filepath / channel. How can I achieve this?
>
> Thanks
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/02a8c6ba-7a2b-4161-80da-23e079ac72b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to