pipeline { agent { docker { image 'rust:latest' } } stages { stage('Rustfmt') { steps { sh "rustup component add rustfmt" sh "cargo fmt -- --check" } } stage('Clippy') { steps { sh "rustup component add clippy" sh "cargo clippy --all-targets --all-features -- -D warnings" } } stage('Build') { steps { sh "cargo install cargo-deb" sh "cargo deb" } } } post { always { archiveArtifacts artifacts: 'target/debian/*.deb', fingerprint: true } } }