aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-10-23 17:28:35 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-10-23 17:28:35 +0300
commit8db0db4dbf0d560fd2b8a325a39a039ec8a38f87 (patch)
tree9ab187be9a71379facf981f491dcca50669fed4f
parent4842624d20924020969995a526663bf8b1c1deec (diff)
downloadjenkins-plugin-linaro-pubapi-8db0db4dbf0d560fd2b8a325a39a039ec8a38f87.tar.gz
Set both parameters in a single ParametersAction.
This in particular fixes multiple "Parameters" entries on build page. Change-Id: Ic665d62018837de3565dbeb6d446cccfd7076170
-rw-r--r--src/main/java/linaro/pubapi/LinaroPubAPIKey.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/linaro/pubapi/LinaroPubAPIKey.java b/src/main/java/linaro/pubapi/LinaroPubAPIKey.java
index 45d5fbd..ca91ac3 100644
--- a/src/main/java/linaro/pubapi/LinaroPubAPIKey.java
+++ b/src/main/java/linaro/pubapi/LinaroPubAPIKey.java
@@ -3,6 +3,7 @@ package linaro.pubapi;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.ArrayList;
import hudson.AbortException;
import hudson.Extension;
@@ -170,14 +171,18 @@ public class LinaroPubAPIKey extends Builder {
method.releaseConnection();
}
- build.addAction(new ParametersAction(new StringParameterValue("PUBLISH_TOKEN", token)));
+ ArrayList params = new ArrayList();
+
+ params.add(new StringParameterValue("PUBLISH_TOKEN", token));
Matcher m = Pattern.compile("(.+://.+?/)").matcher(url);
if (m.find()) {
String serverUrl = m.group(1);
- build.addAction(new ParametersAction(new StringParameterValue("PUBLISH_SERVER", serverUrl)));
+ params.add(new StringParameterValue("PUBLISH_SERVER", serverUrl));
}
+ build.addAction(new ParametersAction(params));
+
return true;
}
}