artifacts icon indicating copy to clipboard operation
artifacts copied to clipboard

Uploading a single file creates a directory named `:`

Open sjackman opened this issue 10 years ago • 4 comments

When I upload a single file, it creates a directory named : (colon), which is a bit weird.

❯❯❯ ARTIFACTS_REGION=us-west-2 artifacts upload --key=$redacted --secret=$redacted --bucket=linuxbrew hi
INFO[0000] uploading with settings                       bucket=linuxbrew cache_control=private permissions=private
INFO[0000] uploading: /gsc/btl/linuxbrew/hi (size: 14B)  download_url=https://s3.amazonaws.com/linuxbrew/:/hi

sjackman avatar Feb 04 '16 18:02 sjackman

I'm having the same issue. @sjackman were you able to implement any workarounds?

leonardorb avatar Mar 10 '17 19:03 leonardorb

No. I just looked for the artifacts in the directory named :.

sjackman avatar Mar 10 '17 19:03 sjackman

@sjackman debugging here I was able to come up with a simple solution:

artifacts upload \
  --key <ARTIFACTS_KEY> \
  --secret <ARTIFACTS_SECRET> \
  --bucket <ARTIFACTS_S3_BUCKET> \
  --target-paths "/" \
  <YOUR BUILD PATH>

The key here is --target-paths "/". It worked just fine for me. For multiple files or for a single file. Hope it helps! Maybe you can close this issue.

leonardorb avatar Mar 10 '17 20:03 leonardorb

Thanks, Leo. I ended up moving to Circle CI, because it's not possible (as far as I know) to upload artifacts to S3 from a fork pull request with Travis CI.

sjackman avatar Mar 10 '17 20:03 sjackman