Details
-
Type:
Bug
-
Status: Reopened (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Component/s: junit-plugin
-
Labels:None
-
Similar Issues:
Description
Some time back, declarative pipelines were marking a stage as unstable, and I was able to have something like:
pipeline { stage { steps { sh 'runuittests' } post { always { junit 'junit.xml' } } } stage { when { expression { currentBuild.resultIsBetterOrEqualTo('SUCCESS') } } steps { // Only runs when tests are stable } } }
However, this stopped working at some point in the recent past.
currentBuild.result does not seem to be populated when junit marks the build unstable.
Attachments
Issue Links
- is duplicated by
-
JENKINS-48267 JUnit failures do not trigger unstable post steps
-
- Resolved
-
- links to
PR up for junit at https://github.com/jenkinsci/junit-plugin/pull/91 to switch to setting the Run result, getting currentBuild.result and friends back to behaving like expected.