Compare commits
10 Commits
aae261ffa3
...
137ab417ec
| Author | SHA1 | Date | |
|---|---|---|---|
| 137ab417ec | |||
| 260354a009 | |||
| 407bc6311c | |||
| 39a361ec41 | |||
| 9ec20b53e3 | |||
| a86ddef535 | |||
| b3e3a68736 | |||
| f26cfa6950 | |||
| 4b57b3d45a | |||
| 983b67833b |
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
@ -2,12 +2,21 @@ pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Test') {
|
||||
stage('app') {
|
||||
steps {
|
||||
withChecks(name: 'Test') {
|
||||
echo 'Testing..'
|
||||
sh './gradlew clean test jacocoTestReport jacocoTestCoverageVerification'
|
||||
withChecks(name: 'build', includeStage: false) {
|
||||
sh './gradlew clean testClasses'
|
||||
}
|
||||
withChecks(name: 'test-coverage', includeStage: false) {
|
||||
sh './gradlew 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,11 +37,20 @@ 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.4".toBigDecimal()
|
||||
minimum = "0.2".toBigDecimal()
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +62,7 @@ tasks.jacocoTestCoverageVerification {
|
||||
limit {
|
||||
counter = "LINE"
|
||||
value = "TOTALCOUNT"
|
||||
maximum = "0.3".toBigDecimal()
|
||||
minimum = "0.3".toBigDecimal()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user