travis-ci / artifacts

Travis CI Artifacts Uploader
MIT License
87 stars 24 forks source link

Setting the prefix to which files are uploaded to S3 #63

Open achille-roussel opened 9 years ago

achille-roussel commented 9 years ago

Hi all,

I'm trying to figure out how to change the default prefix that artifacts get uploaded to, currently it looks like {github repo}/{build number}/{build number}.{version}/{file name}.

I've read http://docs.travis-ci.com/user/uploading-artifacts/ but it's not mentioned how to control that.

Cheers!

achille-roussel commented 9 years ago

So I turned on debugging and looked into the code and found the TargetPaths config option:

I've tried setting the ARTIFACTS_TARGET_PATHS environment variable in .travis.yml but that did not override the default target_paths.

So I've set addons.artifacts.target_paths and this did overwrite the default value.

Am I relying on something that isn't well tested yet, I'm wondering why there isn't more documentation on the subject?

achille-roussel commented 9 years ago

Another weird behavior:

target_paths:
  - builds

Put stuff into the /builds prefix but:

target_paths:
  - ''

Put stuff into the /: prefix...

sjackman commented 8 years ago

Put stuff into the /: prefix...

I'm seeing this as well. See #67