File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,32 +4,42 @@ pipeline {
44 stage(' Build' ) {
55 agent {
66 docker {
7- image ' python:3.4-slim '
7+ image ' python:2-alpine '
88 }
99 }
1010 steps {
11- sh ' python -m py_compile sources/add2vals.py'
11+ sh ' python -m py_compile sources/add2vals.py sources/calc.py '
1212 }
1313 }
1414 stage(' Test' ) {
1515 agent {
1616 docker {
17- image ' python:3.4-slim '
17+ image ' qnib/pytest '
1818 }
1919 }
2020 steps {
21- sh ' python sources/test_calc.py'
21+ sh ' py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
22+ }
23+ post {
24+ always {
25+ junit ' test-reports/results.xml'
26+ }
2227 }
2328 }
2429 stage(' Deliver' ) {
2530 agent {
2631 docker {
27- image ' cdrx/pyinstaller-linux'
32+ image ' cdrx/pyinstaller-linux:python2 '
2833 }
2934 }
3035 steps {
3136 sh ' pyinstaller --onefile sources/add2vals.py'
3237 }
38+ post {
39+ success {
40+ archiveArtifacts ' dist/add2vals'
41+ }
42+ }
3343 }
3444 }
3545}
You can’t perform that action at this time.
0 commit comments