Add steps section to Jenkinsfile
Jenkins decarative syntax requires steps inside a stage
@@ -35,20 +35,26 @@ pipeline {
stages {
stage("Run lint") {
+ steps {
sh 'docker-compose -f docker/compose/docker-compose.yaml run --rm transact bash -c "cd /project/transact && cargo fmt --version"'
sh 'docker-compose -f docker/compose/docker-compose.yaml run --rm transact bash -c "cd /project/transact && cargo clippy --version"'
sh 'docker-compose -f docker/compose/docker-compose.yaml up --build'
sh 'docker-compose -f docker/compose/docker-compose.yaml down'
}
+ }
stage("Run unit tests") {
+ steps {
sh 'docker-compose -f docker/compose/docker-compose.yaml run --rm transact bash -c "cd /project/transact && cargo test"'
}
+ }
stage("Build rust docs") {
+ steps {
sh 'docker-compose -f docker/compose/docker-compose.yaml run --rm transact bash -c "cd /project/transact && cargo doc"'
}
}
+ }
post {
always {
sh 'docker-compose down'
