improve jenkins #11

Merged
bquarkz merged 2 commits from dev/improve-jenkins into master 2026-04-08 08:24:16 +00:00
2 changed files with 50 additions and 43 deletions

View File

@ -19,7 +19,7 @@ clean:
cargo llvm-cov clean --workspace
coverage:
cargo llvm-cov --workspace --all-features --html --output-dir target/llvm-cov/html
cargo llvm-cov --workspace --all-features --html --output-dir target/llvm-cov
coverage-xml:
cargo llvm-cov report --cobertura --output-path target/llvm-cov/cobertura.xml

View File

@ -2,6 +2,9 @@ pipeline {
agent any
environment {
CARGO_HOME = '/var/jenkins_home/.cargo'
CARGO_TARGET_DIR = 'target'
CARGO_TERM_COLOR = 'always'
MIN_LINES = '60'
@ -12,7 +15,6 @@ pipeline {
stages {
stage('Build') {
steps {
withChecks(name: 'Test', includeStage: true) {
sh '''
set -eux
make ci cobertura
@ -50,6 +52,11 @@ pipeline {
echo "Coverage gate passed."
'''
// withChecks(name: 'Test', includeStage: true) {
// sh '''
// set -eux
// make ci cobertura
// '''
// recordCoverage(
// tools: [[parser: 'COBERTURA', pattern: 'target/llvm-cov/cobertura.xml']],
// sourceCodeRetention: 'LAST_BUILD',
@ -65,13 +72,12 @@ pipeline {
// [metric: 'BRANCH', baseline: 'PROJECT', threshold: 0.0]
// ]
// )
}
// }
}
} // Test
stage('Reports') {
steps {
script {
publishHTML(target: [
allowMissing: false,
alwaysLinkToLastBuild: true,
@ -81,7 +87,8 @@ pipeline {
reportName: 'Rust Coverage HTML',
reportTitles: 'Coverage Report'
])
}
archiveArtifacts artifacts: 'target/llvm-cov/**', fingerprint: true
}
} // Reports
}