diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 000000000..1f5a4e11c --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent any + options { + skipStagesAfterUnstable() + } + 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 --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' + } + } + } + } +} \ No newline at end of file