fix/pipeline #19

Closed
bquarkz wants to merge 18 commits from fix/pipeline into master
Showing only changes of commit 5c649f3481 - Show all commits

43
Jenkinsfile vendored
View File

@ -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,