artifacts icon indicating copy to clipboard operation
artifacts copied to clipboard

Setting the prefix to which files are uploaded to S3

Open achille-roussel opened this issue 10 years ago • 3 comments

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 avatar Nov 13 '15 23:11 achille-roussel

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

  • https://github.com/travis-ci/artifacts/blob/48e3060eb2b50c3ee7a1a8ae065eb6a7dd23747e/upload/options.go

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 avatar Nov 14 '15 00:11 achille-roussel

Another weird behavior:

target_paths:
  - builds

Put stuff into the /builds prefix but:

target_paths:
  - ''

Put stuff into the /: prefix...

achille-roussel avatar Nov 14 '15 00:11 achille-roussel

Put stuff into the /: prefix...

I'm seeing this as well. See #67

sjackman avatar Feb 04 '16 18:02 sjackman