diff --git a/Jenkinsfile b/Jenkinsfile index c419f7c..b0eb374 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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,