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 RelativePath annotation to doFillZoneItems query parameters #338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/main/java/hudson/plugins/ec2/SlaveTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import javax.servlet.ServletException;

import hudson.RelativePath;
import hudson.util.Secret;
import jenkins.model.Jenkins;
import jenkins.model.JenkinsLocationConfiguration;
Expand Down Expand Up @@ -1374,9 +1375,11 @@ public FormValidation doCheckLaunchTimeoutStr(@QueryParameter String value) {
return FormValidation.error("Launch Timeout must be a non-negative integer (or null)");
}

public ListBoxModel doFillZoneItems(@QueryParameter boolean useInstanceProfileForCredentials,
@QueryParameter String credentialsId, @QueryParameter String region, @QueryParameter String roleArn,
@QueryParameter String roleSessionName)
public ListBoxModel doFillZoneItems(@QueryParameter @RelativePath("..") boolean useInstanceProfileForCredentials,
@QueryParameter @RelativePath("..") String credentialsId,
@QueryParameter @RelativePath("..") String region,
@QueryParameter @RelativePath("..") String roleArn,
@QueryParameter @RelativePath("..") String roleSessionName)
throws IOException, ServletException {
AWSCredentialsProvider credentialsProvider = EC2Cloud.createCredentialsProvider(useInstanceProfileForCredentials, credentialsId, roleArn, roleSessionName, region);
return EC2AbstractSlave.fillZoneItems(credentialsProvider, region);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ THE SOFTWARE.
</f:entry>

<f:entry title="${%Availability Zone}" field="zone">
<!-- this is preferred but there is a problem with making it work FRU 22 Feb 12
See: https://groups.google.com/group/jenkinsci-dev/t/af37fa7fe2769b0c -->
<!-- <f:select/>-->
<f:textbox/>
<f:select/>
</f:entry>

<f:optionalBlock name="spotConfig" title="Use Spot Instance" checked="${instance.spotConfig != null}">
Expand Down