Reputation: 3460
I have a file in my root directory catalog.json
. I use a bitbucket pipeline to perform this step:
- aws s3 cp catalog.json s3://testunzipping/ --recursive
However, I get an error that:
Skipping file /opt/atlassian/pipelines/agent/build/catalog.json/. File does not exist.
Why is it checking for the catalog.json file in this path? Why is not extracting the file from the root? How can I modify the command accordingly?
Upvotes: 1
Views: 1226
Reputation: 1664
The problem is that you are trying to use --recursive
for a single file. The command is trying to evaluate it as a directory because of the --recursive
parameter. And it's ending up giving File does not exist
error. I reproduced it by trying to copy a single file with --recursive
parameter, I got the same error, but after removing it, it worked.
You can use this ;
aws s3 cp catalog.json s3://testunzipping/
Also for the answer of your other question;
Bitbucket Pipelines runners are using /opt/atlassian/pipelines/agent/build
directory. This is actually pipelines' root directory. Runners are pulling code from the repo there and processing it according to your pipeline structure. It's a built-in situation.
Upvotes: 3