Jon Burney
Jon Burney

Reputation: 21

Travis CI: Uploading artifacts to S3 results in "The bucket you are attempting to access must be addressed using the specified endpoint"

I have a Travis CI build that is configured to upload the build artifacts to S3. I've followed the Travis artifacts documentation but when the build completes I get the following error (and the S3 container is empty).

ERROR: failed to upload: /home/travis/build/jonburney/KingsgateMediaPlayer-Android/
app/build/outputs/apk/app-release-unsigned.apk

err: The bucket you are attempting to access must be addressed using the specified 
endpoint. Please send all future requests to this endpoint.

I have tried to specify the "endpoint" option in the configuration but it was ignored. It appears to be attempting to upload the file to

https://s3.amazonaws.com/kmp-build-output/jonburney/KingsgateMediaPlayer-Android/30/30.1/app/build/outputs/apk/app-release-unsigned.apk.

Here is a copy of the relevant section from my .travis.yml file

addons:
    artifacts: true
    s3_region: "us-west-2"
    artifacts:
        paths:
          - $(git ls-files -o app/build/outputs | tr "\n" ":")

Have I missed a configuration option for this scenario? Any help is appreciated!

Upvotes: 1

Views: 424

Answers (1)

Jon Burney
Jon Burney

Reputation: 21

This was fixed after an email to the Travis-CI support team and some investigation. The code in my .travis.yml file was modified to ensure that "artifacts" was only present once, like so:

addons:
    artifacts:
        s3_region: "us-west-2"
        paths:
          - $(git ls-files -o app/build/outputs | tr "\n" ":")

Upvotes: 1

Related Questions