Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-18146] upport for comma separated fields for downstream jobs
  • Loading branch information
syl20bnr authored and syl20bnr committed May 30, 2013
1 parent a7ac64e commit 4b650d1
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions src/main/java/org/jenkinsci/plugins/jobgenerator/GeneratorRun.java
Expand Up @@ -716,22 +716,31 @@ public void visit(Text node){
}

private String updateProjectReference(Text node){
String result = node.getText();
for(DownstreamGenerator dg: this.downGenerators){
if(!dg.processed && dg.job.getName().equals(node.getText())){
result = "";
for(List<ParametersAction> lpa: dg.importParams){
if(result.length() > 0){
result += ",";
}
result += GeneratorRun.getExpandedJobName(
String result = "";
for(String s: node.getText().split(",")){
s = Util.fixEmptyAndTrim(s);
if(s != null){
for(DownstreamGenerator dg: this.downGenerators){
if(!dg.processed && dg.job.getName().equals(s)){
for(List<ParametersAction> lpa: dg.importParams){
if(result.length() > 0){
result += ",";
}
result += GeneratorRun.getExpandedJobName(
(JobGenerator)dg.job, lpa);
}
dg.processed = true;
break;
}
}
dg.processed = true;
break;
}
}
return result;
if(result.length() > 0){
return result;
}
else{
return node.getText();
}
}
}

Expand Down

0 comments on commit 4b650d1

Please sign in to comment.