diff --git a/src/main/java/jenkins/plugins/extracolumns/BuildParametersColumn.java b/src/main/java/jenkins/plugins/extracolumns/BuildParametersColumn.java
index 1e60e5d..3e73543 100644
--- a/src/main/java/jenkins/plugins/extracolumns/BuildParametersColumn.java
+++ b/src/main/java/jenkins/plugins/extracolumns/BuildParametersColumn.java
@@ -37,26 +37,26 @@
public class BuildParametersColumn extends ListViewColumn {
- private boolean singlePara;
- private String parameterName;
+ private boolean useRegex;
+ private String regex;
@DataBoundConstructor
- public BuildParametersColumn(boolean singlePara, String parameterName) {
+ public BuildParametersColumn(boolean useRegex, String regex) {
super();
- this.singlePara = singlePara;
- this.parameterName = parameterName;
+ this.useRegex = useRegex;
+ this.regex = regex;
}
public BuildParametersColumn() {
this(false, "");
}
- public boolean isSinglePara(){
- return singlePara;
+ public boolean isUseRegex(){
+ return useRegex;
}
- public String getParameterName(){
- return parameterName;
+ public String getRegex(){
+ return regex;
}
public String getBuildParameters(Job, ?> job) {
@@ -69,7 +69,7 @@ public String getBuildParameters(Job, ?> job) {
if(action instanceof ParametersAction) {
ParametersAction pa = (ParametersAction)action;
for (ParameterValue p : pa.getParameters()) {
- if(!isSinglePara() || p.getName().equalsIgnoreCase(parameterName)){
+ if(!isUseRegex() || p.getName().matches(regex)){
s.append(p.getShortDescription()).append(" ${%This column shows a single build parameter or all build parameters of the current/last build.} ${%This column shows either all build parameters or build parameters matching a regular expression of the current/last build.}
");
}
}
diff --git a/src/main/resources/jenkins/plugins/extracolumns/BuildParametersColumn/config.jelly b/src/main/resources/jenkins/plugins/extracolumns/BuildParametersColumn/config.jelly
index bc2cac7..6e6aa9c 100644
--- a/src/main/resources/jenkins/plugins/extracolumns/BuildParametersColumn/config.jelly
+++ b/src/main/resources/jenkins/plugins/extracolumns/BuildParametersColumn/config.jelly
@@ -27,10 +27,10 @@
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
.* | matches any character sequence | +
foo.* | matches any string that starts with "foo" | +
^((?!bar).)*$ | matches any string that does not start with "bar" | +
(?i) | makes the regular expression case insensitive | +
+You can find more info here:
+