Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.AutoCompletionCandidates;
import hudson.EnvVars;
import hudson.Extension;
import hudson.Launcher;
import hudson.Util;
Expand Down Expand Up @@ -95,9 +96,20 @@ public AggregatedTestResultPublisher(String jobs, boolean includeFailedBuilds) {

public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
// add a TestResult just so that it can show up later.
build.addAction(new TestResultAction(jobs, includeFailedBuilds, build));
// Expand the jobs String as it can contain variable
String expandedJobs = this.getJobs(build.getEnvironment(listener));
build.addAction(new TestResultAction(expandedJobs, includeFailedBuilds, build));
return true;
}

/**
* Return the expanded job list
* @param env
* @return
*/
public String getJobs(EnvVars env) {
return (env != null ? env.expand(this.jobs) : this.jobs);
}

public BuildStepMonitor getRequiredMonitorService() {
return BuildStepMonitor.NONE;
Expand Down