Compare commits
No commits in common. "407bc6311c32cd091bb4dbdefcd53f7c3e137268" and "8d620984e3f12deed36333c8f78fa3faf6d6caa3" have entirely different histories.
407bc6311c
...
8d620984e3
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 test'
|
||||
junit '**/build/test-results/test/TEST-*.xml'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,15 +37,6 @@ 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 {
|
||||
@ -55,14 +46,14 @@ tasks.jacocoTestCoverageVerification {
|
||||
}
|
||||
|
||||
rule {
|
||||
isEnabled = true
|
||||
isEnabled = false
|
||||
element = "CLASS"
|
||||
includes = listOf("jenkins.test.*")
|
||||
|
||||
limit {
|
||||
counter = "LINE"
|
||||
value = "TOTALCOUNT"
|
||||
minimum = "0.3".toBigDecimal()
|
||||
maximum = "0.3".toBigDecimal()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user