From 85890aef26f931a4aba80aacee4cf6f12b0e8c27 Mon Sep 17 00:00:00 2001 From: Jonathan Ross Claytor Date: Wed, 30 Jan 2019 15:05:34 -0600 Subject: [PATCH] add deliver --- Jenkinsfile | 55 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8910dda..a3f3057 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,30 +1,45 @@ - pipeline { - agent none +pipeline { + agent none stages { - stage('Build') { + stage('Build') { agent { docker { - image 'python:2-alpine' + image 'python:2-alpine' } } steps { - sh 'python -m py_compile sources/add2vals.py sources/calc.py' + sh 'python -m py_compile sources/add2vals.py sources/calc.py' + } + } + stage('Test') { + agent { + docker { + image 'qnib/pytest' + } + } + steps { + sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py' + } + post { + always { + junit 'test-reports/results.xml' + } + } + } + stage('Deliver') { + agent { + docker { + image 'cdrx/pyinstaller-linux:python2' + } + } + steps { + sh 'pyinstaller --onefile sources/add2vals.py' + } + post { + success { + archiveArtifacts 'dist/add2vals' + } } } - stage('Test') { - agent { - docker { - image 'qnib/pytest' - } - } - steps { - sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py' - } - post { - always { - junit 'test-reports/results.xml' - } - } - } } }