Skip to content

Commit

Permalink
JENKINS-59583 set stage result/warning
Browse files Browse the repository at this point in the history
  • Loading branch information
famod authored and Cyrille Le Clerc committed Oct 10, 2019
1 parent ae2a083 commit 3437345
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jenkins-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.32</version>
<version>2.34</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor;
import org.jenkinsci.plugins.pipeline.maven.MavenPublisher;
import org.jenkinsci.plugins.pipeline.maven.util.XmlUtils;
import org.jenkinsci.plugins.workflow.actions.WarningAction;
import org.jenkinsci.plugins.workflow.graph.FlowNode;
import org.jenkinsci.plugins.workflow.steps.StepContext;
import org.kohsuke.stapler.DataBoundConstructor;
Expand Down Expand Up @@ -334,8 +335,7 @@ private void executeReporter(StepContext context, TaskListener listener, List<El
if (LOGGER.isLoggable(Level.FINE)) {
listener.getLogger().println("[withMaven] junitPublisher - " + testResultAction.getResult().getFailCount() + " unit test failure(s) found, mark job as unstable");
}
// TODO: Once JENKINS-43995 lands, update this to set the step status instead of the entire build.
// context.setResult(Result.UNSTABLE);
node.addAction(new WarningAction(Result.UNSTABLE).withMessage(testResultAction.getResult().getFailCount() + " unit test failure(s) found"));
run.setResult(Result.UNSTABLE);
}
} catch (Exception e) {
Expand Down

0 comments on commit 3437345

Please sign in to comment.