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
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('build') {
|
stage('Test') {
|
||||||
steps {
|
steps {
|
||||||
withChecks(name: 'test-coverage', includeStage: true) {
|
withChecks(name: 'Test') {
|
||||||
sh './gradlew clean test jacocoTestReport jacocoTestCoverageVerification'
|
echo 'Testing..'
|
||||||
// junit '**/build/test-results/test/TEST-*.xml'
|
sh './gradlew clean test'
|
||||||
recordCoverage(tools: [[parser: 'JACOCO']],
|
junit '**/build/test-results/test/TEST-*.xml'
|
||||||
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,15 +37,6 @@ jacoco {
|
|||||||
toolVersion = "0.8.12"
|
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 {
|
tasks.jacocoTestCoverageVerification {
|
||||||
violationRules {
|
violationRules {
|
||||||
rule {
|
rule {
|
||||||
@ -55,14 +46,14 @@ tasks.jacocoTestCoverageVerification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rule {
|
rule {
|
||||||
isEnabled = true
|
isEnabled = false
|
||||||
element = "CLASS"
|
element = "CLASS"
|
||||||
includes = listOf("jenkins.test.*")
|
includes = listOf("jenkins.test.*")
|
||||||
|
|
||||||
limit {
|
limit {
|
||||||
counter = "LINE"
|
counter = "LINE"
|
||||||
value = "TOTALCOUNT"
|
value = "TOTALCOUNT"
|
||||||
minimum = "0.3".toBigDecimal()
|
maximum = "0.3".toBigDecimal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user