2019-02-14 01:09:18 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
2019-03-12 11:26:01 +00:00
|
|
|
args '-v cargo-cache:/cargocache:rw'
|
2019-02-14 01:09:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stages {
|
2019-03-12 11:26:01 +00:00
|
|
|
stage('Build') {
|
2019-03-12 08:45:58 +00:00
|
|
|
steps {
|
2019-03-12 11:26:01 +00:00
|
|
|
sh 'cargo build'
|
2019-03-12 08:45:58 +00:00
|
|
|
}
|
|
|
|
}
|
2019-03-12 11:26:01 +00:00
|
|
|
stage('Check') {
|
2019-02-14 01:09:18 +00:00
|
|
|
steps {
|
2019-03-12 11:26:01 +00:00
|
|
|
sh 'cargo fmt --all -- --check'
|
|
|
|
sh 'cargo clippy'
|
2019-02-14 01:09:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Test') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo test --all'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|