diff --git a/Jenkinsfile b/Jenkinsfile index 41bdb6d..c43dd88 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,9 +16,9 @@ pipeline { recordCoverage(tools: [[parser: 'JACOCO']], id: 'jacoco', name: 'JaCoCo Coverage', sourceCodeRetention: 'EVERY_BUILD' - , qualityGates: [ - [threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true], - [threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true]] +// , qualityGates: [ +// [threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true], +// [threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true]] ) } } diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f287f99..9c71e65 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -37,36 +37,36 @@ jacoco { toolVersion = "0.8.12" } -tasks.jacocoTestReport { - reports { - xml.required = true - csv.required = false - html.required = false - } -} - -//tasks.jacocoTestCoverageVerification { -// violationRules { -// rule { -// limit { -// minimum = "0.4".toBigDecimal() -// } -// } -// -// rule { -// isEnabled = false -// element = "CLASS" -// includes = listOf("jenkins.test.*") -// -// limit { -// counter = "LINE" -// value = "TOTALCOUNT" -// maximum = "0.3".toBigDecimal() -// } -// } +//tasks.jacocoTestReport { +// reports { +// xml.required = true +// csv.required = false +// html.required = true // } //} +tasks.jacocoTestCoverageVerification { + violationRules { + rule { + limit { + minimum = "0.4".toBigDecimal() + } + } + + rule { + isEnabled = true + element = "CLASS" + includes = listOf("jenkins.test.*") + + limit { + counter = "LINE" + value = "TOTALCOUNT" + minimum = "0.3".toBigDecimal() + } + } + } +} + application { // Define the main class for the application. mainClass.set("jenkins.test.App")