Prevent "Publish JUnit test result report" changes build result

Viewed 1208

Currently the build step Publish JUnit test result report changes build result to UNSTABLE.

Build step 'Publish JUnit test result report' changed build result to UNSTABLE

But I don't want it makes any change to my build status. I try to set

  • Health report amplification factor = 0.0
  • Allow empty results. Do not fail the build on empty test results (checked)

But the plugin still changes the build status. How can I disable updating build results by the plugin?

1 Answers

You can add the parameter:

skipMarkingBuildUnstable:true

in your jenkins pipeline. For me it works fine after this:

junit testResults: 'target/surefire-reports/junitreports/TEST-RunCucumberTest.xml', skipPublishingChecks: true, skipMarkingBuildUnstable:true

This info is not actually visible in plugin website: https://plugins.jenkins.io/junit/

But this change is merged and available: https://github.com/jenkinsci/junit-plugin/pull/282

Related