This commit is contained in:
Xiao Jia shan 2019-03-08 12:14:43 +08:00
parent 2340547dd3
commit ad25e183ef

19
Jenkinsfile vendored
View file

@ -6,6 +6,7 @@ pipeline {
docker { docker {
image 'python:2-alpine' image 'python:2-alpine'
} }
} }
steps { steps {
sh 'python -m py_compile sources/add2vals.py sources/calc.py' sh 'python -m py_compile sources/add2vals.py sources/calc.py'
@ -16,14 +17,17 @@ pipeline {
docker { docker {
image 'richardx/pytest' image 'richardx/pytest'
} }
}
steps {
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'
} }
}
steps {
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
} }
} }
stage('Deliver') { stage('Deliver') {
@ -31,14 +35,17 @@ pipeline {
docker { docker {
image 'richardx/pyinstaller-linux:python2' image 'richardx/pyinstaller-linux:python2'
} }
}
steps {
sh 'pyinstaller --onefile sources/add2vals.py'
} }
post { post {
success { success {
archiveArtifacts 'dist/add2vals' archiveArtifacts 'dist/add2vals'
} }
}
steps {
sh 'pyinstaller --onefile sources/add2vals.py'
} }
} }
} }