pipeline { agent any stages { stage('Verify') { steps { withChecks(name: 'Rust Verify', includeStage: true) { sh ''' set -e rustup component add clippy rustfmt llvm-tools-preview cargo fmt --all -- --check cargo clippy --all-targets --all-features -- -D warnings ''' } } } stage('Test + Coverage') { steps { withChecks(name: 'Rust Test', includeStage: true) { sh ''' set -e cargo install cargo-llvm-cov --locked || true cargo llvm-cov --all-features --workspace --cobertura --output-path coverage.xml ''' } } } stage('Reports') { steps { recordCoverage( tools: [[parser: 'COBERTURA', pattern: 'coverage.xml']], id: 'rust-coverage', name: 'Rust Coverage', sourceCodeRetention: 'EVERY_BUILD' ) } } } }