Jenkins CI (#2)
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good
Co-authored-by: Cameron Cordes <cameronc.dev@gmail.com> Reviewed-on: #2 Co-authored-by: cameron <cameron.cordes@pm.me> Co-committed-by: cameron <cameron.cordes@pm.me>
This commit was merged in pull request #2.
This commit is contained in:
30
Jenkinsfile
vendored
Normal file
30
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'rust:1.48'
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user