ci: enforce a shared strict repository quality gate
This commit is contained in:
Vendored
+34
-40
@@ -4,55 +4,49 @@ pipeline {
|
||||
environment {
|
||||
CARGO_HOME = '/var/jenkins_home/.cargo'
|
||||
CARGO_TARGET_DIR = 'target'
|
||||
|
||||
CARGO_TERM_COLOR = 'always'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
stage('Prepare reports') {
|
||||
steps {
|
||||
dir('target/quality-gate') { deleteDir() }
|
||||
dir('target/llvm-cov') { deleteDir() }
|
||||
}
|
||||
}
|
||||
stage('Provision') {
|
||||
steps {
|
||||
sh '''
|
||||
set -eux
|
||||
set -eu
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
bash scripts/provision-quality-gate.sh
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Quality gate') {
|
||||
steps {
|
||||
sh '''
|
||||
set -eu
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
make ci-domains
|
||||
'''
|
||||
// withChecks(name: 'Test', includeStage: true) {
|
||||
// sh '''
|
||||
// set -eux
|
||||
// make ci-domains
|
||||
// '''
|
||||
// recordCoverage(
|
||||
// tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']],
|
||||
// sourceCodeRetention: 'LAST_BUILD',
|
||||
// enabledForFailure: true,
|
||||
// failOnError: false,
|
||||
// checksAnnotationScope: 'MODIFIED_LINES',
|
||||
// id: 'rust-coverage',
|
||||
// name: 'Rust Coverage',
|
||||
// checksName: 'Rust Coverage',
|
||||
// qualityGates: [
|
||||
// [metric: 'LINE', baseline: 'MODIFIED_LINES', threshold: 0.0],
|
||||
// [metric: 'LINE', baseline: 'PROJECT', threshold: 0.0],
|
||||
// [metric: 'BRANCH', baseline: 'PROJECT', threshold: 0.0]
|
||||
// ]
|
||||
// )
|
||||
// }
|
||||
}
|
||||
} // Test
|
||||
}
|
||||
}
|
||||
|
||||
stage('Reports') {
|
||||
steps {
|
||||
publishHTML(target: [
|
||||
allowMissing: false,
|
||||
alwaysLinkToLastBuild: true,
|
||||
keepAll: true,
|
||||
reportDir: 'target/llvm-cov/html',
|
||||
reportFiles: 'index.html',
|
||||
reportName: 'Rust Coverage HTML',
|
||||
reportTitles: 'Coverage Report'
|
||||
])
|
||||
|
||||
archiveArtifacts artifacts: 'target/llvm-cov/**', fingerprint: true
|
||||
}
|
||||
} // Reports
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: 'target/quality-gate/**,target/llvm-cov/**',
|
||||
fingerprint: true, allowEmptyArchive: true
|
||||
publishHTML(target: [
|
||||
allowMissing: true,
|
||||
alwaysLinkToLastBuild: true,
|
||||
keepAll: true,
|
||||
reportDir: 'target/llvm-cov/html',
|
||||
reportFiles: 'index.html',
|
||||
reportName: 'Rust Coverage HTML',
|
||||
reportTitles: 'Coverage Report'
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user