Compare commits

..

No commits in common. "260354a00970cf21b39d89e849b703cfffcc2bf7" and "9c34ce094f291371d54b3fd3654f019418f905e9" have entirely different histories.

2 changed files with 7 additions and 22 deletions

16
Jenkinsfile vendored
View File

@ -2,18 +2,12 @@ pipeline {
agent any agent any
stages { stages {
stage('build') { stage('Test') {
steps { steps {
withChecks(name: 'test-coverage', includeStage: true) { withChecks(name: 'Test') {
sh './gradlew clean test jacocoTestReport jacocoTestCoverageVerification' echo 'Testing..'
// junit '**/build/test-results/test/TEST-*.xml' sh './gradlew clean jacocoTestReport jacocoTestCoverageVerification'
recordCoverage(tools: [[parser: 'JACOCO']], junit '**/build/test-results/test/TEST-*.xml'
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]]
)
} }
} }
} }

View File

@ -37,20 +37,11 @@ jacoco {
toolVersion = "0.8.12" toolVersion = "0.8.12"
} }
tasks.jacocoTestReport {
reports {
xml.required.set(true)
xml.outputLocation.set(file("build/reports/jacoco/test/jacoco.xml"))
csv.required.set(false)
html.required.set(false)
}
}
tasks.jacocoTestCoverageVerification { tasks.jacocoTestCoverageVerification {
violationRules { violationRules {
rule { rule {
limit { limit {
minimum = "0.9".toBigDecimal() minimum = "0.4".toBigDecimal()
} }
} }
@ -62,7 +53,7 @@ tasks.jacocoTestCoverageVerification {
limit { limit {
counter = "LINE" counter = "LINE"
value = "TOTALCOUNT" value = "TOTALCOUNT"
minimum = "0.3".toBigDecimal() maximum = "0.3".toBigDecimal()
} }
} }
} }