add project parameters and bindep file
1.add project parameters 2.add bindep file to install maven and openjdk-7-jdk The plugin missing customed parameters which are defined in project. Change-Id: If9580042590156025b0be6a69675186ee876c2ed Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
This commit is contained in:
parent
6f898a9b4d
commit
d4970b7064
|
@ -0,0 +1,3 @@
|
|||
maven [test]
|
||||
# Javac Compiler in lib/tools.jar
|
||||
openjdk-7-jdk [test platform:dpkg]
|
|
@ -20,6 +20,8 @@
|
|||
package hudson.plugins.gearman;
|
||||
|
||||
import hudson.model.Action;
|
||||
import hudson.model.ParameterDefinition;
|
||||
import hudson.model.ParametersDefinitionProperty;
|
||||
import hudson.model.ParameterValue;
|
||||
import hudson.model.Result;
|
||||
import hudson.model.AbstractBuild;
|
||||
|
@ -158,6 +160,17 @@ public class StartJobWorker extends AbstractGearmanFunction {
|
|||
for (Map.Entry<String, String> entry : inParams.entrySet()) {
|
||||
buildParams.add(new TextParameterValue(entry.getKey(), entry.getValue()));
|
||||
}
|
||||
|
||||
// merge the build parameters from client and job definition
|
||||
ParametersDefinitionProperty property =
|
||||
(ParametersDefinitionProperty) project.getProperty(
|
||||
ParametersDefinitionProperty.class);
|
||||
if (property != null) {
|
||||
for (ParameterDefinition def : property.getParameterDefinitions()) {
|
||||
buildParams.add(def.getDefaultParameterValue());
|
||||
}
|
||||
}
|
||||
|
||||
String offline = inParams.get("OFFLINE_NODE_WHEN_COMPLETE");
|
||||
if (offline != null) {
|
||||
if (offline.equals("1") || offline.equals("true") ||
|
||||
|
|
Loading…
Reference in New Issue