simple-python-pyinstaller-app/jenkins/Jenkinsfile
2021-12-14 11:03:54 +01:00

31 lines
812 B
Groovy

pipeline {
agent none
stages {
stage('Build') {
steps {
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
stash(name: 'compiled-results', includes: 'sources/*.py')
}
}
stage('Test') {
steps {
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
}
post {
always {
junit 'test-reports/results.xml'
}
}
}
stage('Deliver') {
steps {
sh 'pyinstaller --onefile sources/add2vals.py'
}
post {
success {
archiveArtifacts 'dist/add2vals'
}
}
}
}
}