From 07c1ffd57488dc16fdec99a175b9996fe513137d Mon Sep 17 00:00:00 2001 From: Xiao Jia shan <649788479@qq.com> Date: Fri, 8 Mar 2019 12:32:34 +0800 Subject: [PATCH] Add Logfilemonitor --- Jenkinsfile | 58 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a873ca6..89491dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,14 +2,23 @@ pipeline { agent none stages { stage('Build') { - agent { - docker { - image 'python:2-alpine' - } + parallel { + stage('Build-add2vals') { + agent { + docker { + image 'python:2-alpine' + } - } - steps { - sh 'python -m py_compile sources/add2vals.py sources/calc.py' + } + steps { + sh 'python -m py_compile sources/add2vals.py sources/calc.py' + } + } + stage('Build-logfilemonitor') { + steps { + sh 'python -m py_compile sources/LogfileMonitor.py' + } + } } } stage('Test') { @@ -31,21 +40,30 @@ pipeline { } } stage('Deliver') { - agent { - docker { - image 'richardx/pyinstaller-linux:python2' + parallel { + stage('Deliver-add2vals') { + agent { + docker { + image 'richardx/pyinstaller-linux:python2' + } + + } + post { + success { + archiveArtifacts 'dist/add2vals' + + } + + } + steps { + sh 'pyinstaller --onefile sources/add2vals.py' + } } - - } - post { - success { - archiveArtifacts 'dist/add2vals' - + stage('Delivery-logfilemonitor') { + steps { + sh 'pyinstaller --onefile sources/LogfileMonitor.py' + } } - - } - steps { - sh 'pyinstaller --onefile sources/add2vals.py' } } }