edited Jenkinsfile with dockzr

This commit is contained in:
labourde 2021-12-14 11:14:02 +01:00
parent a06f159dd8
commit 0f64018b52

15
jenkins/Jenkinsfile vendored
View file

@ -2,12 +2,22 @@ pipeline {
agent none agent none
stages { stages {
stage('Build') { stage('Build') {
agent {
docker {
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'
stash(name: 'compiled-results', includes: 'sources/*.py') stash(name: 'compiled-results', includes: 'sources/*.py')
} }
} }
stage('Test') { stage('Test') {
agent {
docker {
image 'python:2-alpine'
}
}
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'
} }
@ -18,6 +28,11 @@ pipeline {
} }
} }
stage('Deliver') { stage('Deliver') {
agent {
docker {
image 'python:2-alpine'
}
}
steps { steps {
sh 'pyinstaller --onefile sources/add2vals.py' sh 'pyinstaller --onefile sources/add2vals.py'
} }