fix/pipeline #17

Closed
bquarkz wants to merge 17 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
stages {
// stage('Build') {
// steps {
// withChecks(name: 'build', includeStage: false) {
// withGradle {
// sh """
// ./gradlew clean testClasses --no-daemon
// """
// }
// }
// }
// } // Build
stage('Build') {
steps {
withChecks(name: 'build', includeStage: false) {
withChecks(name: 'Test', includeStage: false) {
withGradle {
sh """
./gradlew clean testClasses --no-daemon
"""
}
}
}
} // Build
stage('Test') {
steps {
withChecks(name: 'test-coverage', includeStage: false) {
withGradle {
sh """
./gradlew test jacocoTestReport jacocoTestCoverageVerification --no-daemon
./gradlew clean test jacocoTestReport jacocoTestCoverageVerification --no-daemon
"""
}
recordCoverage(tools: [[parser: 'JACOCO', pattern: '**/build/reports/jacoco/test/jacoco*.xml']],
@ -27,20 +27,19 @@ pipeline {
name: 'Jacoco Coverage',
sourceCodeRetention: 'EVERY_BUILD',
qualityGates: [
[threshold: 40.0, metric: 'CLASS', baseline: 'PROJECT', unstable: true],
[threshold: 40.0, metric: 'METHOD', baseline: 'PROJECT', unstable: true],
[threshold: 40.0, metric: 'LINE', baseline: 'PROJECT', unstable: true],
[threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true]]
)
[threshold: 40.0, metric: 'CLASS', baseline: 'PROJECT'],
[threshold: 40.0, metric: 'METHOD', baseline: 'PROJECT'],
[threshold: 40.0, metric: 'LINE', baseline: 'PROJECT'],
[threshold: 40.0, metric: 'BRANCH', baseline: 'PROJECT']])
junit testResults: '**/build/test-results/test/TEST-*.xml'
}
}
} // Test
stage('Post') {
stage('Reports') {
steps {
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
publishHTML (target: [
allowMissing: true,