-
Notifications
You must be signed in to change notification settings - Fork 193
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 ability to specify custom endpoint url #138
Conversation
Change to non deprecated API Modernise the plugin pom Added realistic tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Co-authored-by: Jesse Glick <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual configuration of the endpoint in agent VMs seems unnecessary.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable.
@@ -24,7 +24,11 @@ | |||
com.amazonaws.services.s3.model.Region.US_Standard.toAWSRegion().getName()); | |||
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that at first, but as I was editing various calls to it, it felt like a good shortcut to have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
README update ? |
You can specify the system property
hudson.plugins.s3.ENDPOINT
or environment variablePLUGIN_S3_ENDPOINT
to 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