Compare commits
No commits in common. "137ab417ec04d1529ec86c194578ae57ff1b8a36" and "aae261ffa3c2718792a9beef3d1692960c6d3016" have entirely different histories.
137ab417ec
...
aae261ffa3
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
@ -2,21 +2,12 @@ pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('app') {
|
||||
stage('Test') {
|
||||
steps {
|
||||
withChecks(name: 'build', includeStage: false) {
|
||||
sh './gradlew clean testClasses'
|
||||
}
|
||||
withChecks(name: 'test-coverage', includeStage: false) {
|
||||
sh './gradlew test jacocoTestReport jacocoTestCoverageVerification'
|
||||
withChecks(name: 'Test') {
|
||||
echo 'Testing..'
|
||||
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]]
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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.2".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