fix/pipeline #20
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@ -2,13 +2,16 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('build') {
|
stage('app') {
|
||||||
steps {
|
steps {
|
||||||
withChecks(name: 'test-coverage', includeStage: true) {
|
withChecks(name: 'build', includeStage: false) {
|
||||||
sh './gradlew clean test jacocoTestReport jacocoTestCoverageVerification'
|
sh './gradlew clean testClasses'
|
||||||
// junit '**/build/test-results/test/TEST-*.xml'
|
}
|
||||||
|
withChecks(name: 'test-coverage', includeStage: false) {
|
||||||
|
sh './gradlew test jacocoTestReport jacocoTestCoverageVerification'
|
||||||
|
junit '**/build/test-results/test/TEST-*.xml'
|
||||||
recordCoverage(tools: [[parser: 'JACOCO']],
|
recordCoverage(tools: [[parser: 'JACOCO']],
|
||||||
id: 'jacoco', name: 'JaCoCo Coverage',
|
id: 'jacoco', name: 'jacoco-coverage',
|
||||||
sourceCodeRetention: 'EVERY_BUILD'
|
sourceCodeRetention: 'EVERY_BUILD'
|
||||||
// , qualityGates: [
|
// , qualityGates: [
|
||||||
// [threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true],
|
// [threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true],
|
||||||
|
|||||||
@ -50,7 +50,7 @@ tasks.jacocoTestCoverageVerification {
|
|||||||
violationRules {
|
violationRules {
|
||||||
rule {
|
rule {
|
||||||
limit {
|
limit {
|
||||||
minimum = "0.9".toBigDecimal()
|
minimum = "0.2".toBigDecimal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user