-
Notifications
You must be signed in to change notification settings - Fork 690
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
allow alternate ec2 endpoint for region population #330
allow alternate ec2 endpoint for region population #330
Conversation
Would you be able to add any tests for this feature? |
i've never actually built a jenkins plugin or ran tests with jelly UIs, so i'm not sure how that would work. i could look at writing a test for the |
Just any sort of test that verifies the feature exists and isn't broken by someone else. |
i've added a test for the URL construction. let me know if there's anything else i should do |
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, thanks for the contribution!
@@ -58,4 +64,18 @@ public void testConfigRoundtrip() throws Exception { | |||
Cloud actual = r.jenkins.clouds.iterator().next(); | |||
r.assertEqualBeans(orig, actual, "cloudName,region,useInstanceProfileForCredentials,accessId,privateKey,instanceCap,roleArn,roleSessionName"); | |||
} | |||
|
|||
/** | |||
* Unit tests related to {@link AmazonEC2Cloud}, but do not require a Jenkins instance. |
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.
You might be able to use the @WithoutJenkins
annotation on the test method without having to make an inner class.
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.
when i move the method to the outer class and add @Test
and @WithoutJenkins
i end up with this error:
[ERROR] Errors:
[ERROR] hudson.plugins.ec2.AmazonEC2CloudTest.testEC2EndpointURLCreation(hudson.plugins.ec2.AmazonEC2CloudTest)
[ERROR] Run 1: AmazonEC2CloudTest.testConfigRoundtrip:61 » NullPointer
[ERROR] Run 2: AmazonEC2CloudTest.testConfigRoundtrip:61 » NullPointer
[ERROR] Run 3: AmazonEC2CloudTest.testConfigRoundtrip:61 » NullPointer
[ERROR] Run 4: AmazonEC2CloudTest.testConfigRoundtrip:61 » NullPointer
[ERROR] Run 5: AmazonEC2CloudTest.testConfigRoundtrip:61 » NullPointer
maybe im doing something wrong there?
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.
here's the stacktrace:
-------------------------------------------------------------------------------
Test set: hudson.plugins.ec2.AmazonEC2CloudTest
-------------------------------------------------------------------------------
Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.348 s <<< FAILURE! - in hudson.plugins.ec2.AmazonEC2CloudTest
testEC2EndpointURLCreation(hudson.plugins.ec2.AmazonEC2CloudTest) Time elapsed: 0.342 s <<< ERROR!
java.lang.NullPointerException
at jenkins.security.ConfidentialStore.get(ConfidentialStore.java:67)
at jenkins.security.ConfidentialKey.load(ConfidentialKey.java:47)
at jenkins.security.CryptoConfidentialKey.getKey(CryptoConfidentialKey.java:41)
at jenkins.security.CryptoConfidentialKey.decrypt(CryptoConfidentialKey.java:134)
at hudson.util.HistoricalSecrets.decrypt(HistoricalSecrets.java:49)
at hudson.util.Secret.decrypt(Secret.java:207)
at hudson.util.Secret.fromString(Secret.java:239)
at hudson.plugins.ec2.EC2PrivateKey.<init>(EC2PrivateKey.java:50)
at hudson.plugins.ec2.EC2Cloud.<init>(EC2Cloud.java:177)
at hudson.plugins.ec2.AmazonEC2Cloud.<init>(AmazonEC2Cloud.java:74)
at hudson.plugins.ec2.AmazonEC2CloudTest.testConfigRoundtrip(AmazonEC2CloudTest.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)
@jvz yay, thanks for reviewing it! what's the process for getting this merged and released? |
We can wait for another review from another EC2 maintainer, or we'll merge this within a few days if there's no negative feedback. Thanks again! |
I am starting to merge for the release 1.43 |
yay! looking forward to 1.43 :) |
is there an ETA on the release of 1.43? |
I'd like for the beginning of the next week after the Fosdem.
…On Tue, Jan 29, 2019 at 6:02 AM Javier Campanini ***@***.***> wrote:
is there an ETA on the release of 1.43?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#330 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABD_gs_9n9tT-g4GkAsjzz_pLkYSM1kBks5vH9XrgaJpZM4aLydY>
.
|
friendly ping |
@jmcampanini pings might work better in the gitter channel. |
The RC started to be tested on some system if you are able to test as well
it will be high appreciated :-)
https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/ec2/1.43-SNAPSHOT/
I received one feedback that agent name is not visible.
Br
FM
…On Wed, Feb 6, 2019 at 5:41 AM Javier Campanini ***@***.***> wrote:
friendly ping
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#330 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABD_gsdu2SLCBo3gxR7zWRoEgqEjxCc7ks5vKl0QgaJpZM4aLydY>
.
|
@thoulen The link Thank you |
Hi,
we enabled the incremental, now you can find the snapshot at :
https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/ec2/
…On Mon, Mar 11, 2019 at 9:45 PM David Schile ***@***.***> wrote:
@thoulen <https://github.com/thoulen> The link
https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/ec2/1.43-SNAPSHOT/
is 404. What's the status of this?
Thank you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#330 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABD_ghaFdcjujutFNp5H0WWliBqDPTErks5vVsB8gaJpZM4aLydY>
.
|
We're running a jenkins instance inside of a govcloud ec2 box that does not have access to
ec2.amazonaws.com
. Because of that, the population of the region dropdown fails. This PR is an attempt to allow the user to configure the alternate EC2 endpoint that is used to populate the region dropdown. The value is not used anywhere else.If there is a way to gracefully handle the manual entering of the region in the dropdown instead, that would work as well.
Related commit: e851e59
// tagging @ajlake