Some checks failed
Core Repos/ImageApi/pipeline/pr-master There was a failure building this commit
This should improve build times with changes that don't change the dependencies in Cargo.toml.
31 lines
497 B
Groovy
31 lines
497 B
Groovy
pipeline {
|
|
agent {
|
|
dockerfile {
|
|
filename 'Dockerfile.ci'
|
|
args '-v "$PWD:/usr/src/image-api'
|
|
}
|
|
}
|
|
|
|
stages {
|
|
stage('build') {
|
|
steps {
|
|
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 {
|
|
always {
|
|
sh 'rm -f .env'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|