Skip to content

Commit

Permalink
[FIXED JENKINS-23851] Expand env vars in the ant pattern field
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Oct 9, 2015
1 parent eb95aac commit 6a0eb8a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/org/tap4j/plugin/TapPublisher.java
Expand Up @@ -37,9 +37,11 @@
import org.tap4j.plugin.model.TestSetMap;
import org.tap4j.plugin.util.Constants;

import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.matrix.MatrixAggregatable;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;
Expand Down Expand Up @@ -243,9 +245,12 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,

PrintStream logger = listener.getLogger();
logger.println("TAP Reports Processing: START");
logger.println("Looking for TAP results report in workspace using pattern: " + this.testResults);

FilePath[] reports = locateReports(build.getWorkspace(), this.testResults);
EnvVars envVars = build.getEnvironment(listener);
String antPattern = Util.replaceMacro(this.testResults, envVars);
logger.println("Looking for TAP results report in workspace using pattern: " + antPattern);

FilePath[] reports = locateReports(build.getWorkspace(), antPattern);

/*
* filter out the reports based on timestamps. See JENKINS-12187
Expand Down

0 comments on commit 6a0eb8a

Please sign in to comment.