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

Allow the build to fail on low coverage

    XMLWordPrintable

Details

    • New Feature
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • cobertura-plugin
    • None
    • Jenkins Cobertura Plugin: 1.3
      Jenkins: 1.430
      Grails Cobertura plugin for code coverage in the project

    Description

      Suppose my code coverage is below 80%. I want the build to be marked as failure by providing an option on the job page or so.

      I think right now it's providing only the change of icons for low coverage.

      Attachments

        Issue Links

          Activity

            sogabe sogabe added a comment -

            merged. fix in 1.6.

            sogabe sogabe added a comment - merged. fix in 1.6.

            Code changed in jenkins
            User: Po-Dar Wang
            Path:
            src/main/java/hudson/plugins/cobertura/CoberturaBuildAction.java
            src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
            src/main/java/hudson/plugins/cobertura/MavenCoberturaBuildAction.java
            src/main/java/hudson/plugins/cobertura/MavenCoberturaPublisher.java
            src/main/java/hudson/plugins/cobertura/renderers/SourceEncoding.java
            src/main/java/hudson/plugins/cobertura/targets/CoverageTarget.java
            src/main/java/hudson/plugins/cobertura/targets/CoverageTree.java
            src/main/java/hudson/plugins/cobertura/targets/CoverageTreeElement.java
            src/main/resources/hudson/plugins/cobertura/CoberturaPublisher/config.jelly
            src/main/resources/hudson/plugins/cobertura/CoberturaPublisher/config.properties
            src/test/java/hudson/plugins/cobertura/CoverageResultTest.java
            src/test/resources/hudson/plugins/cobertura/coverage-with-lots-of-data.xml
            http://jenkins-ci.org/commit/cobertura-plugin/1cef2b6890bf3388e7e80f12bbe8588035049403
            Log:
            Fixed bug:
            JENKINS-14589

            Added Features:
            JENKINS-11025
            JENKINS-8326

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Po-Dar Wang Path: src/main/java/hudson/plugins/cobertura/CoberturaBuildAction.java src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java src/main/java/hudson/plugins/cobertura/MavenCoberturaBuildAction.java src/main/java/hudson/plugins/cobertura/MavenCoberturaPublisher.java src/main/java/hudson/plugins/cobertura/renderers/SourceEncoding.java src/main/java/hudson/plugins/cobertura/targets/CoverageTarget.java src/main/java/hudson/plugins/cobertura/targets/CoverageTree.java src/main/java/hudson/plugins/cobertura/targets/CoverageTreeElement.java src/main/resources/hudson/plugins/cobertura/CoberturaPublisher/config.jelly src/main/resources/hudson/plugins/cobertura/CoberturaPublisher/config.properties src/test/java/hudson/plugins/cobertura/CoverageResultTest.java src/test/resources/hudson/plugins/cobertura/coverage-with-lots-of-data.xml http://jenkins-ci.org/commit/cobertura-plugin/1cef2b6890bf3388e7e80f12bbe8588035049403 Log: Fixed bug: JENKINS-14589 Added Features: JENKINS-11025 JENKINS-8326

            I've been waiting for this since a long time. Hoping that it gets accepted and a new version released.

            bond Ravi Teja Lokineni added a comment - I've been waiting for this since a long time. Hoping that it gets accepted and a new version released.
            pwang25 Podar Wang added a comment -

            @Ravi, I have done so already. I am still waiting for a response.

            pwang25 Podar Wang added a comment - @Ravi, I have done so already. I am still waiting for a response.

            @Podar can you ask this on the jenkins mailing list probably someone might respond

            bond Ravi Teja Lokineni added a comment - @Podar can you ask this on the jenkins mailing list probably someone might respond
            pwang25 Podar Wang added a comment -

            I have successfully added this feature.
            https://github.com/podarsmarty/cobertura-plugin

            pwang25 Podar Wang added a comment - I have successfully added this feature. https://github.com/podarsmarty/cobertura-plugin

            As per the comment this doesn't seem to be a duplicate

            bond Ravi Teja Lokineni added a comment - As per the comment this doesn't seem to be a duplicate
            bond Ravi Teja Lokineni added a comment - Duplicate of https://issues.jenkins-ci.org/browse/JENKINS-8326

            People

              pwang25 Podar Wang
              bond Ravi Teja Lokineni
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: