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
stages {
stage('build') {
stage('Test') {
steps {
withChecks(name: 'test-coverage', includeStage: true) {
sh './gradlew clean test jacocoTestReport jacocoTestCoverageVerification'
// junit '**/build/test-results/test/TEST-*.xml'
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]]
)
withChecks(name: 'Test') {
echo 'Testing..'
sh './gradlew clean jacocoTestReport jacocoTestCoverageVerification'
junit '**/build/test-results/test/TEST-*.xml'
}
}
}

View File

@ -37,20 +37,11 @@ jacoco {
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 {
violationRules {
rule {
limit {
minimum = "0.9".toBigDecimal()
minimum = "0.4".toBigDecimal()
}
}
@ -62,7 +53,7 @@ tasks.jacocoTestCoverageVerification {
limit {
counter = "LINE"
value = "TOTALCOUNT"
minimum = "0.3".toBigDecimal()
maximum = "0.3".toBigDecimal()
}
}
}