Added jenkinsfile, hopefully it works first time fingers crossed
This commit is contained in:
39
Jenkinsfile
vendored
Normal file
39
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
stages {
|
||||
stage('Verify Cargo installation') {
|
||||
steps {
|
||||
sh 'cargo --version'
|
||||
sh 'cargo fmt --version'
|
||||
sh 'cargo clippy --version'
|
||||
sh 'cargo tarpaulin --version'
|
||||
}
|
||||
}
|
||||
|
||||
// All the tests and static checks
|
||||
stage('Parallel tasks') {
|
||||
parallel {
|
||||
stage('Test') {
|
||||
steps {
|
||||
echo 'Starting test step...'
|
||||
sh 'cargo test'
|
||||
}
|
||||
}
|
||||
stage('Check Formatting') {
|
||||
echo 'Starting format check...'
|
||||
sh 'cargo fmt --check'
|
||||
}
|
||||
stage('Clippy') {
|
||||
echo 'Starting linter...'
|
||||
sh 'cargo clippy -- -D warnings'
|
||||
}
|
||||
stage('Code coverage') {
|
||||
echo 'Starting code coverage step...'
|
||||
sh 'cargo tarpaulin --verbose --workspace'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build and deploy will occur here probably
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user