jenkinsjenkins-job-dslclover

DSL support for Clover Maven Plugin Support


Currently I am using Clover Maven Plugin to check code coverage.

I configured Jenkins to Clover plugin manually and was able to see the code coverage metrics. I used the below link for configuration. https://wiki.jenkins.io/display/JENKINS/Clover+Plugin

Now, I am trying to use dsl file to create the Jenkins task, and it seems dsl supports CloverPHP plugin alone.

Is there any other alternative way to configure the Clover Plugin via dsl.


Solution

  • Tried with below code and it worked

    configure { project ->
        project / 'publishers' << 'hudson.plugins.clover.CloverPublisher' {
            cloverReportDir 'target/site/clover'
            cloverReportFileName 'clover.xml'
            healthyTarget {
                methodCoverage 70
                conditionalCoverage 80
                statementCoverage 80
            }
        }
    }