Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[FIXED JENKINS-27233] Fixed exception in parameter pages or rebuild p…
…ages for non multi-configuration builds triggered with combinations parameters (in the case triggered with parameterized-trigger-plugin).
- Loading branch information
|
@@ -13,13 +13,21 @@ f = namespace("lib/form") |
|
|
nsProject = namespace("/hudson/plugins/matrix_configuration_parameter/taglib") |
|
|
|
|
|
|
|
|
def paramDef = it; |
|
|
String nameIt = it.getName(); |
|
|
MatrixProject project = request.findAncestorObject(MatrixProject.class); |
|
|
if (project == null) //in case project is not a Matrix Project |
|
|
if (project == null) { |
|
|
//in case project is not a Matrix Project |
|
|
f.entry(title: nameIt, description: it.getDescription()) { |
|
|
div(name: "parameter") { |
|
|
input(type: "hidden", name: "name", value: nameIt) |
|
|
text(_("Not applicable. Applicable only to multi-configuration projects.")) |
|
|
}//div |
|
|
} |
|
|
return; |
|
|
} |
|
|
|
|
|
AxisList axes = project.getAxes(); |
|
|
def paramDef = it; |
|
|
String nameIt = it.getName(); |
|
|
Layouter layouter = new Layouter<Combination>(axes) { |
|
|
protected Combination getT(Combination c) { |
|
|
return c; |
|
|
|
@@ -16,12 +16,21 @@ f = namespace("lib/form") |
|
|
nsProject = namespace("/hudson/plugins/matrix_configuration_parameter/taglib") |
|
|
|
|
|
|
|
|
def valueIt = it; |
|
|
|
|
|
MatrixProject project = request.findAncestorObject(MatrixProject.class); |
|
|
AxisList axes = project.getAxes(); |
|
|
MatrixBuild build = request.findAncestorObject(MatrixBuild.class); |
|
|
if (build == null) //in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild |
|
|
if (project == null || build == null) { |
|
|
//in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild |
|
|
f.entry(title: valueIt.getName(), description: it.getDescription()) { |
|
|
// In the case the parameter is not defined in this project, |
|
|
// sending parameters cause rebuild-plugin throws exception. |
|
|
// Acts as if I'm not here. |
|
|
text(_("Not applicable. Applicable only to multi-configuration projects.")) |
|
|
} |
|
|
return; |
|
|
def valueIt = it; |
|
|
} |
|
|
AxisList axes = project.getAxes(); |
|
|
Layouter layouter = new Layouter<Combination>(axes) { |
|
|
protected Combination getT(Combination c) { |
|
|
return c; |
|
|
|
@@ -15,12 +15,20 @@ st = namespace("jelly:stapler") |
|
|
f = namespace("lib/form") |
|
|
nsProject = namespace("/hudson/plugins/matrix_configuration_parameter/taglib") |
|
|
|
|
|
MatrixCombinationsParameterValue valueIt = it; |
|
|
MatrixProject project = request.findAncestorObject(MatrixProject.class); |
|
|
AxisList axes = project.getAxes(); |
|
|
MatrixBuild build = request.findAncestorObject(MatrixBuild.class); |
|
|
if (build == null) //in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild |
|
|
if (project == null || build == null) { |
|
|
//in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild |
|
|
f.entry(title: valueIt.getName(), description: it.getDescription()) { |
|
|
div(name: "parameter") { |
|
|
input(type: "hidden", name: "name", value: valueIt.getName()) |
|
|
text(_("Not applicable. Applicable only to multi-configuration projects.")) |
|
|
}//div |
|
|
} |
|
|
return; |
|
|
MatrixCombinationsParameterValue valueIt = it; |
|
|
} |
|
|
AxisList axes = project.getAxes(); |
|
|
Layouter layouter = new Layouter<Combination>(axes) { |
|
|
protected Combination getT(Combination c) { |
|
|
return c; |
|
|