Compare commits
No commits in common. "260354a00970cf21b39d89e849b703cfffcc2bf7" and "9c34ce094f291371d54b3fd3654f019418f905e9" have entirely different histories.
260354a009
...
9c34ce094f
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user