Add ability to specify custom endpoint url#138
Merged
Conversation
Change to non deprecated API Modernise the plugin pom Added realistic tests
jtnord
reviewed
Oct 7, 2021
Member
jtnord
left a comment
There was a problem hiding this comment.
main issue is the ENDPOINT envvar - should this use SystemProperties? (is it run on the agent or the controller), but in any case the getenv calls looks like it will generally fail
Other than that looks OK to me
jglick
reviewed
Oct 7, 2021
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
jglick
suggested changes
Oct 8, 2021
Member
jglick
left a comment
There was a problem hiding this comment.
Manual configuration of the endpoint in agent VMs seems unnecessary.
daniel-beck
reviewed
Oct 12, 2021
Member
Author
|
I have finally managed to verify that the new code works against S3 as before. So now I can continue fixing the code review comments. |
jglick
approved these changes
Oct 13, 2021
| public static final String ENDPOINT = System.getProperty("hudson.plugins.s3.ENDPOINT", System.getenv("PLUGIN_S3_ENDPOINT")); | ||
|
|
||
| public static AmazonS3 createClient(String accessKey, String secretKey, boolean useRole, String region, ProxyConfiguration proxy) | ||
| public static AmazonS3 createClient(String accessKey, String secretKey, boolean useRole, String region, ProxyConfiguration proxy) { |
Member
Author
There was a problem hiding this comment.
I did that at first, but as I was editing various calls to it, it felt like a good shortcut to have.
This was referenced Oct 15, 2021
|
README update ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You can specify the system property
hudson.plugins.s3.ENDPOINTor environment variablePLUGIN_S3_ENDPOINTto a custom http(s) url. When the custom endpoint is set the Region setting will have no effect.Change to non deprecated API
Modernize the plugin pom
Added realistic tests using the custom endpoint