Skip to content
Permalink
Browse files
[FIXED JENKINS-23851] Expand env vars in the ant pattern field
  • Loading branch information
kinow committed Oct 9, 2015
1 parent eb95aac commit 6a0eb8a54764197e487d6a48a197ed2a37bc933d
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/main/java/org/tap4j/plugin/TapPublisher.java
@@ -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;
@@ -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

0 comments on commit 6a0eb8a

Please sign in to comment.