fix/pipeline #21
43
Jenkinsfile
vendored
43
Jenkinsfile
vendored
@ -2,24 +2,24 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
// stage('Build') {
|
||||||
|
// steps {
|
||||||
|
// withChecks(name: 'build', includeStage: false) {
|
||||||
|
// withGradle {
|
||||||
|
// sh """
|
||||||
|
// ./gradlew clean testClasses --no-daemon
|
||||||
|
// """
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } // Build
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
withChecks(name: 'build', includeStage: false) {
|
withChecks(name: 'Test', includeStage: false) {
|
||||||
withGradle {
|
withGradle {
|
||||||
sh """
|
sh """
|
||||||
./gradlew clean testClasses --no-daemon
|
./gradlew clean test jacocoTestReport jacocoTestCoverageVerification --no-daemon
|
||||||
"""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // Build
|
|
||||||
|
|
||||||
stage('Test') {
|
|
||||||
steps {
|
|
||||||
withChecks(name: 'test-coverage', includeStage: false) {
|
|
||||||
withGradle {
|
|
||||||
sh """
|
|
||||||
./gradlew test jacocoTestReport jacocoTestCoverageVerification --no-daemon
|
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
recordCoverage(tools: [[parser: 'JACOCO', pattern: '**/build/reports/jacoco/test/jacoco*.xml']],
|
recordCoverage(tools: [[parser: 'JACOCO', pattern: '**/build/reports/jacoco/test/jacoco*.xml']],
|
||||||
@ -27,20 +27,19 @@ pipeline {
|
|||||||
name: 'Jacoco Coverage',
|
name: 'Jacoco Coverage',
|
||||||
sourceCodeRetention: 'EVERY_BUILD',
|
sourceCodeRetention: 'EVERY_BUILD',
|
||||||
qualityGates: [
|
qualityGates: [
|
||||||
[threshold: 40.0, metric: 'CLASS', baseline: 'PROJECT', unstable: true],
|
[threshold: 40.0, metric: 'CLASS', baseline: 'PROJECT'],
|
||||||
[threshold: 40.0, metric: 'METHOD', baseline: 'PROJECT', unstable: true],
|
[threshold: 40.0, metric: 'METHOD', baseline: 'PROJECT'],
|
||||||
[threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true],
|
[threshold: 40.0, metric: 'LINE', baseline: 'PROJECT'],
|
||||||
[threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true]]
|
[threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT']])
|
||||||
|
junit testResults: '**/build/test-results/test/TEST-*.xml'
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Test
|
} // Test
|
||||||
|
|
||||||
stage('Post') {
|
stage('Reports') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
junit '**/build/test-results/test/TEST-*.xml'
|
// junit skipPublishingChecks: true, testResults: '**/build/test-results/test/TEST-*.xml'
|
||||||
// archiveArtifacts artifacts: '**/coverage-sources.zip', allowEmptyArchive: false, fingerprint: false, onlyIfSuccessful: false
|
// archiveArtifacts artifacts: '**/coverage-sources.zip', allowEmptyArchive: false, fingerprint: false, onlyIfSuccessful: false
|
||||||
publishHTML (target: [
|
publishHTML (target: [
|
||||||
allowMissing: true,
|
allowMissing: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user