diff --git a/files/config/Jenkinsfile b/files/config/Jenkinsfile index ec1e1257..ba9d083c 100644 --- a/files/config/Jenkinsfile +++ b/files/config/Jenkinsfile @@ -1,52 +1,54 @@ pipeline { agent any - environment { - CARGO_TERM_COLOR = 'always' - } + environment { + CARGO_TERM_COLOR = 'always' + } - stages { - stage('Build') { - steps { - withChecks(name: 'Test', includeStage: true) { - sh ''' - set -eux - make ci - ''' - } - publishHTML(target: [ - allowMissing: false, - alwaysLinkToLastBuild: true, - keepAll: true, - reportDir: 'target/llvm-cov/html', - reportFiles: 'index.html', - reportName: 'Rust Coverage HTML', - reportTitles: 'Coverage Report' - ]) - } - } // Test - stage('Coverage') { - steps { - sh ''' - set -eux - make cobertura - ''' - recordCoverage( - tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']], - sourceCodeRetention: 'LAST_BUILD', - enabledForFailure: true, - failOnError: true, - checksAnnotationScope: 'MODIFIED_LINES', - checksName: 'Rust Coverage', - qualityGates: [ - [metric: 'LINE', baseline: 'MODIFIED_LINES', threshold: 20.0], - [metric: 'LINE', baseline: 'PROJECT', threshold: 20.0], - [metric: 'BRANCH', baseline: 'PROJECT', threshold: 20.0] - ] - ) - } - } // Cobertura - } + stages { + stage('Build') { + steps { + withChecks(name: 'Test', includeStage: true) { + sh ''' + set -eux + make ci + ''' + } + publishHTML(target: [ + allowMissing: false, + alwaysLinkToLastBuild: true, + keepAll: true, + reportDir: 'target/llvm-cov/html', + reportFiles: 'index.html', + reportName: 'Rust Coverage HTML', + reportTitles: 'Coverage Report' + ]) + } + } // Test + + stage('Coverage') { + steps { + sh ''' + set -eux + make cobertura + ''' + recordCoverage( + tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']], + sourceCodeRetention: 'LAST_BUILD', + enabledForFailure: true, + failOnError: true, + checksAnnotationScope: 'MODIFIED_LINES', + id: 'rust-coverage', + name: 'Rust Coverage', + checksName: 'Rust Coverage', + qualityGates: [ + [metric: 'LINE', baseline: 'MODIFIED_LINES', threshold: 20.0], + [metric: 'LINE', baseline: 'PROJECT', threshold: 20.0], + [metric: 'BRANCH', baseline: 'PROJECT', threshold: 20.0] + ] + ) + } + } // Cobertura } post {