Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

bug fix for JENKINS-6063: endpoint is not a valid URL when doing 'check AMI' with UEC #2

Closed
wants to merge 3 commits into from

2 participants

Wil Selwood Kohsuke Kawaguchi
Wil Selwood
Collaborator

http://issues.jenkins-ci.org/browse/JENKINS-6063

Solved by changing the String ec2EndpointUrl to be a AwsRegion region

Kohsuke Kawaguchi
Owner

Merged. I've also gave you the commit access.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
4  src/main/java/hudson/plugins/ec2/SlaveTemplate.java
@@ -186,9 +186,9 @@ public String getHelpFile(String fieldName) {
186 186
          */
187 187
         public FormValidation doValidateAmi(
188 188
                 @QueryParameter String accessId, @QueryParameter String secretKey,
189  
-                @QueryParameter String ec2EndpointUrl,
  189
+                @QueryParameter AwsRegion region,
190 190
                 final @QueryParameter String ami) throws IOException, ServletException {
191  
-            Jec2 jec2 = EC2Cloud.connect(accessId, secretKey, EC2Cloud.checkEndPoint(ec2EndpointUrl));
  191
+            Jec2 jec2 = EC2Cloud.connect(accessId, secretKey, region.ec2Endpoint);
192 192
             if(jec2!=null) {
193 193
                 try {
194 194
                     List<String> images = new LinkedList<String>();
2  src/main/resources/hudson/plugins/ec2/EC2Cloud/config.jelly
@@ -7,7 +7,7 @@
7 7
         <f:entry title="${%AMI ID}" field="ami">
8 8
           <f:textbox />
9 9
         </f:entry>
10  
-        <f:validateButton title="${%Check AMI}" progress="${%Checking...}" method="validateAmi" with="secretKey,accessId,ec2EndpointUrl,ami" />
  10
+        <f:validateButton title="${%Check AMI}" progress="${%Checking...}" method="validateAmi" with="secretKey,accessId,region,ami" />
11 11
         <f:entry title="${%Instance Type}" help="/plugin/ec2/help/instanceType.html">
12 12
           <f:enum field="type">${it.name()}</f:enum>
13 13
         </f:entry>
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.