Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for JENKINS-9773 - EC2 cannot deal with label expressions
  • Loading branch information
vjuranek committed May 26, 2011
1 parent 3e5ed16 commit 186d07d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/ec2/EC2Cloud.java
Expand Up @@ -124,7 +124,7 @@ public SlaveTemplate getTemplate(String ami) {
*/
public SlaveTemplate getTemplate(Label label) {
for (SlaveTemplate t : templates)
if(t.containsLabel(label))
if(label.matches(t.getLabelSet()))
return t;
return null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/hudson/plugins/ec2/SlaveTemplate.java
Expand Up @@ -102,6 +102,10 @@ public String getRootCommandPrefix() {
return rootCommandPrefix;
}

public Set getLabelSet(){
return labelSet;
}

/**
* Does this contain the given label?
*
Expand Down

0 comments on commit 186d07d

Please sign in to comment.