Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

AWS s3 ORB Overwrite not working #156

Closed
avivbueno opened this issue May 5, 2019 · 6 comments
Closed

AWS s3 ORB Overwrite not working #156

avivbueno opened this issue May 5, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@avivbueno
Copy link

Orb version

2.1
aws-s3 1.0.8

What happened

When overwrite set to true throws an error:
aws s3 sync
bucket s3://aviv-ci-test
--acl public-read
--cache-control "max-age=86400"

--delete
upload: bucket/build_asset1.txt to s3://aviv-ci-test/build_asset1.txt
/bin/bash: line 3: --cache-control: command not found
Exited with code 127### Expected behavior

Delete the previous files on the bucket and sync

@iynere
Copy link
Contributor

iynere commented May 6, 2019

@avivbueno can you share a link to a job where you're seeing this behavior ? thank you !

@iynere iynere added the bug Something isn't working label May 6, 2019
@avivbueno
Copy link
Author

avivbueno commented May 6, 2019

@iynere
https://circleci.com/gh/avivbueno/citest/10

Screenshot: https://imgur.com/a/npqlN6W

config file: https://github.com/avivbueno/citest/blob/master/.circleci/config.yml

@iynere
Copy link
Contributor

iynere commented May 6, 2019

thank you !! @avivbueno

looks like this is a simple bash syntax issue—should be easy to fix, 1 sec

@iynere
Copy link
Contributor

iynere commented May 6, 2019

@avivbueno i believe this is happening because you are passing a multi-line string argument to the arguments parameter, without including \ to allow bash to interpolate the multiple lines

can you try it like this ?

      - aws-s3/sync:
          from: bucket
          to: 's3://aviv-ci-test'
          aws-region: AWS_REGION_BLUE
          overwrite: true
          arguments: |
            --acl public-read \
            --cache-control "max-age=86400" \

may just be an issue of documenting precisely how users should pass single- or multi-line values to that parameter. thanks !

@avivbueno
Copy link
Author

avivbueno commented May 6, 2019

@iynere
Thank you, works like a charm!

@iynere
Copy link
Contributor

iynere commented May 6, 2019

awesome ! well, let's not be too hasty 😄 i'll open a PR to update the documentation for that parameter @avivbueno

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants