edited Jenkinsfile with dockzr

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

17
jenkins/Jenkinsfile vendored
View file

@ -2,12 +2,22 @@ pipeline {
agent none
stages {
stage('Build') {
steps {
agent {
docker {
image 'python:2-alpine'
}
}
steps {
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
stash(name: 'compiled-results', includes: 'sources/*.py')
}
}
stage('Test') {
agent {
docker {
image 'python:2-alpine'
}
}
steps {
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
}
@ -18,6 +28,11 @@ pipeline {
}
}
stage('Deliver') {
agent {
docker {
image 'python:2-alpine'
}
}
steps {
sh 'pyinstaller --onefile sources/add2vals.py'
}