Skip to content

Commit

Permalink
Simple fix to expand variables/parameters for https://issues.jenkins-…
Browse files Browse the repository at this point in the history
  • Loading branch information
Brantone committed Feb 2, 2015
1 parent e6e5f01 commit 4b96929
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/hudson/plugins/nunit/NUnitPublisher.java
@@ -1,6 +1,7 @@
package hudson.plugins.nunit;

import hudson.AbortException;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath.FileCallable;
import hudson.Launcher;
Expand Down Expand Up @@ -136,8 +137,11 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
}
boolean result = true;
try {
EnvVars env = build.getEnvironment(listener);
String resolvedTestResultsPattern = env.expand(testResultsPattern);

listener.getLogger().println("Recording NUnit tests results");
NUnitArchiver transformer = new NUnitArchiver(listener, testResultsPattern, new NUnitReportTransformer(), failIfNoResults);
NUnitArchiver transformer = new NUnitArchiver(listener, resolvedTestResultsPattern, new NUnitReportTransformer(), failIfNoResults);
result = build.getWorkspace().act(transformer);

if (result) {
Expand Down

0 comments on commit 4b96929

Please sign in to comment.