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

Jacoco plugin should also run on unstable or failed builds

    Details

    • Similar Issues:
    • Released As:
      3.0.5

      Description

      We use multiple static checkers (findbugs, pmd etc.) with Jacoco in a pipeline. It is possible that one or more of the static checkers declare a build unstable or failed (because the thresholds for issues are crossed) even though the build itself and all tests pass.

      If I add the "jacoco()" step after "findbugs()", then jacoco will skip the coverage report if findbugs declared the build unstable/failed. If I add it before, it will create the report just fine. 

      Most other post build actions such as PMD, Findbugs, Warnings etc. have a switch "Run Always". Jacoco should have the same switch.

       

        Attachments

          Activity

          Hide
          akress Alexander Kress added a comment -

          Second this improvement request. As this was not declared in documentation and there are no configuration flags it took forever to figure out that this is what is happening. In the build output all that is shown is

          [Pipeline] jacoco

          which gives no indication about why it did not actually create the report.

           

          It would be very useful to at least indicate in the output that the report was not generated because of the build state, but better to add configuration options to select if build state should matter or not.

          Show
          akress Alexander Kress added a comment - Second this improvement request. As this was not declared in documentation and there are no configuration flags it took forever to figure out that this is what is happening. In the build output all that is shown is [Pipeline] jacoco which gives no indication about why it did not actually create the report.   It would be very useful to at least indicate in the output that the report was not generated because of the build state, but better to add configuration options to select if build state should matter or not.
          Hide
          centic centic added a comment -

          Merged PR https://github.com/jenkinsci/jacoco-plugin/pull/104 this will be included in the next release of the JaCoCo plugin.

          Show
          centic centic added a comment - Merged PR https://github.com/jenkinsci/jacoco-plugin/pull/104 this will be included in the next release of the JaCoCo plugin.

            People

            • Assignee:
              ognjenb Ognjen Bubalo
              Reporter:
              hgschmie Henning Schmiedehausen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: