Files
ImageApi/Jenkinsfile
Cameron Cordes 5f1bf58f35
Some checks failed
Core Repos/ImageApi/pipeline/pr-master There was a failure building this commit
Create env file for tests and only archive binary
2021-02-02 16:00:59 -05:00

30 lines
481 B
Groovy

pipeline {
agent {
docker {
image 'rust:1.48'
args '-v "$PWD":/usr/src/image-api'
}
}
stages {
stage('build') {
steps {
sh 'echo $PWD'
sh 'cargo build --release'
archiveArtifacts artifacts: '**/target/release/image-api' fingerprint: true
}
}
stage('test') {
steps {
sh 'echo "BASE_PATH=$PWD" > .env'
sh 'cargo test'
}
post {
sh 'rm -f .env'
}
}
}
}