Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add s3 --host_prefix #1083

Merged
merged 2 commits into from Aug 26, 2019
Merged

add s3 --host_prefix #1083

merged 2 commits into from Aug 26, 2019

Conversation

svenfuchs
Copy link
Contributor

@svenfuchs svenfuchs commented Aug 23, 2019

refers to #1079

can be tested with

deploy:
  provider: s3
  force_path_style: true
  edge:
    branch: sf-s3-subdomain

@mfrancis95
Copy link

From dpl would it be tested using --no-host_prefix?

@svenfuchs
Copy link
Contributor Author

@mfrancis95 yes, but if you put host_prefix: false into your .travis.yml file then our build script compiler will pass --no-host_prefix to dpl

@mfrancis95
Copy link

Just tested it. It looks like it's still trying to deploy to [bucket].[endpoint]:443

@svenfuchs
Copy link
Contributor Author

svenfuchs commented Aug 23, 2019

@mfrancis95 i now think that the option we want might be force_path_style https://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Client.html

i have tested this with a local ruby script, and it has output the expected endpoint, keeping the bucket name on the path:

opening connection to s3.amazonaws.com:443...
opened
starting SSL for s3.amazonaws.com:443...
SSL established, protocol: TLSv1.2, cipher: ECDHE-RSA-AES128-GCM-SHA256
<- "PUT /travis-dpl-test/dpl_test HTTP/1.1\r\nContent-Type: ...
...

in order to keep this consistent with S3's terminology i have renamed the option on our side, too. so you now want to pass:

deploy:
  provider: s3
  force_path_style: true
  edge:
    branch: sf-s3-subdomain

wanna give this a try?

@mfrancis95
Copy link

@svenfuchs that worked! Thank you. This should make the Travis S3 deployment a lot more compatible with S3 gateways out there.

@svenfuchs svenfuchs merged commit 1edbd59 into master Aug 26, 2019
@svenfuchs svenfuchs deleted the sf-s3-subdomain branch August 26, 2019 12:18
@mfrancis95
Copy link

Thanks @svenfuchs. Approximately how long will it take for this change to go live on travis-ci.com?

@svenfuchs
Copy link
Contributor Author

@mfrancis95 we'll release the gem as a preview release today or tomorrow, but that will mean you still need to opt in via edge: true (no need to specify a branch then)

there's no timeline on releasing a stable version ... we'll first want to see what kind of issues come up.

@mfrancis95
Copy link

mfrancis95 commented Aug 28, 2019

@svenfuchs I opted in after seeing this post: https://blog.travis-ci.com/2019-08-27-deployment-tooling-dpl-v2-preview-release

But I got this issue:

/home/travis/.rvm/gems/ruby-2.4.5/gems/cl-1.1.1/lib/cl/parser.rb:21:in `initialize': invalid option: --edge (OptionParser::InvalidOption)

@svenfuchs
Copy link
Contributor Author

woha. thanks for the report @mfrancis95

i've just pushed a change that should fix this.

@mfrancis95
Copy link

Thanks @svenfuchs. It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants