Compare commits

..

No commits in common. "137ab417ec04d1529ec86c194578ae57ff1b8a36" and "aae261ffa3c2718792a9beef3d1692960c6d3016" have entirely different histories.

2 changed files with 6 additions and 24 deletions

17
Jenkinsfile vendored
View File

@ -2,21 +2,12 @@ pipeline {
agent any agent any
stages { stages {
stage('app') { stage('Test') {
steps { steps {
withChecks(name: 'build', includeStage: false) { withChecks(name: 'Test') {
sh './gradlew clean testClasses' echo 'Testing..'
} sh './gradlew clean test jacocoTestReport jacocoTestCoverageVerification'
withChecks(name: 'test-coverage', includeStage: false) {
sh './gradlew test jacocoTestReport jacocoTestCoverageVerification'
junit '**/build/test-results/test/TEST-*.xml' 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]]
)
} }
} }
} }

View File

@ -37,20 +37,11 @@ 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 {
limit { limit {
minimum = "0.2".toBigDecimal() minimum = "0.4".toBigDecimal()
} }
} }
@ -62,7 +53,7 @@ tasks.jacocoTestCoverageVerification {
limit { limit {
counter = "LINE" counter = "LINE"
value = "TOTALCOUNT" value = "TOTALCOUNT"
minimum = "0.3".toBigDecimal() maximum = "0.3".toBigDecimal()
} }
} }
} }