Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46206

findbugs plugin does not fail a pipeline job as requested

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Component/s: findbugs-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      Within a pipeline, I have configured findbugs report :

      deleteDir()
      checkout scm
      sh "mvn clean install"

      findbugs defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', pattern: '**/findbugsXml.xml', failedTotalHigh: '0', unHealthy: ''

      The report is produced correctly. But if a 'High' issue appears, the build is not aborted, and not set to status 'failed'.

      In the console log, findbugs reports:

      [FINDBUGS] Plug-in Result: Failed - <a href="findbugsResult">5 warnings</a> of <a href="findbugsResult/HIGH">priority High</a> exceed the threshold of 0 by 5

      but the build just proceeds as if the report would not find anything.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/test/java/plugins/AbstractAnalysisTest.java
          src/test/java/plugins/FindBugsPluginTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/476d11979b09fae7da97410460f2c76803d58c53
          Log:
          JENKINS-46206 Added a test case.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/plugins/AbstractAnalysisTest.java src/test/java/plugins/FindBugsPluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/476d11979b09fae7da97410460f2c76803d58c53 Log: JENKINS-46206 Added a test case.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/test/java/plugins/AbstractAnalysisTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/6f23ea20e172e79881e080296a72a970d8cf2550
          Log:
          JENKINS-46206 Added a test case.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/plugins/AbstractAnalysisTest.java http://jenkins-ci.org/commit/acceptance-test-harness/6f23ea20e172e79881e080296a72a970d8cf2550 Log: JENKINS-46206 Added a test case.
          Hide
          drulli Ulli Hafner added a comment -

          I created a test case in ATH to reproduce the bug without success. The test cases verifies three different thresholds for unstable or failure but all work as expected.

          Is there anything different in your setup?
          Or are you using some additional plugins that prevent setting the builds status?
          Or is your script more complicated than the snippet shown above?
          Maybe you can create a simple setup that just checks for findbugs without any other special steps.

          Show
          drulli Ulli Hafner added a comment - I created a test case in ATH to reproduce the bug without success. The test cases verifies three different thresholds for unstable or failure but all work as expected. Is there anything different in your setup? Or are you using some additional plugins that prevent setting the builds status? Or is your script more complicated than the snippet shown above? Maybe you can create a simple setup that just checks for findbugs without any other special steps.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              tobias_hd Tobias Munk
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: