update jenkinsfile
Some checks failed
Rust Verify / Verify occurred while executing withChecks step.
Some checks failed
Rust Verify / Verify occurred while executing withChecks step.
This commit is contained in:
parent
b07f2f377a
commit
d46f447273
43
files/config/Jenkinsfile
vendored
43
files/config/Jenkinsfile
vendored
@ -2,31 +2,40 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Setup') {
|
stage('Verify') {
|
||||||
steps {
|
steps {
|
||||||
giteaStatus status: 'PENDING', context: 'ci/jenkins'
|
withChecks(name: 'Rust Verify', includeStage: true) {
|
||||||
sh '''
|
sh '''
|
||||||
set -e
|
set -e
|
||||||
rustup component add clippy rustfmt
|
rustup component add clippy rustfmt llvm-tools-preview
|
||||||
'''
|
cargo fmt --all -- --check
|
||||||
}
|
cargo clippy --all-targets --all-features -- -D warnings
|
||||||
}
|
|
||||||
stage('CI') {
|
|
||||||
steps {
|
|
||||||
sh '''
|
|
||||||
set -e
|
|
||||||
make ci
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
stage('Test + Coverage') {
|
||||||
success {
|
steps {
|
||||||
giteaStatus status: 'SUCCESS', context: 'ci/jenkins'
|
withChecks(name: 'Rust Test', includeStage: true) {
|
||||||
}
|
sh '''
|
||||||
failure {
|
set -e
|
||||||
giteaStatus status: 'FAILURE', context: 'ci/jenkins'
|
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'
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user