Add final deliver stage

This commit is contained in:
xiaojias 2019-03-06 11:56:51 +08:00
parent 697fe2d724
commit 2340547dd3

23
Jenkinsfile vendored
View file

@ -11,18 +11,33 @@ pipeline {
sh 'python -m py_compile sources/add2vals.py sources/calc.py' sh 'python -m py_compile sources/add2vals.py sources/calc.py'
} }
} }
stage('Test') { stage('Test') {
agent { agent {
docker { docker {
image 'richardx/pytest' image 'richardx/pytest'
} }
} }
steps { steps {
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py' sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
} }
post { post {
always { always {
junit 'test-reports/results.xml' junit 'test-reports/results.xml'
}
}
}
stage('Deliver') {
agent {
docker {
image 'richardx/pyinstaller-linux:python2'
}
}
steps {
sh 'pyinstaller --onefile sources/add2vals.py'
}
post {
success {
archiveArtifacts 'dist/add2vals'
} }
} }
} }