How can I do aws s3 cp only if a folder does not exist, throw error otherwise as a part of my jenkins job?

49 views
Skip to first unread message

PJ

unread,
Sep 16, 2016, 3:37:36 PM9/16/16
to Jenkins Users
If there is a way to check if given a path/folder/file exists within S3 using the aws s3 CLI?

Brad White

unread,
Sep 16, 2016, 3:41:38 PM9/16/16
to jenkins...@googlegroups.com

You could just try to ‘ls’ that path and then check the exit status of you command I think.

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ac35e95f-0f58-45d3-b250-27cb02e36e89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages