Update Jenkinsfile for Logfilemonitor

This commit is contained in:
xiaojias 2019-03-08 13:22:56 +08:00
parent 0a5ef30811
commit 9588dd8d92

72
Jenkinsfile vendored
View file

@ -2,29 +2,14 @@ pipeline {
agent none agent none
stages { stages {
stage('Build') { stage('Build') {
parallel { agent {
stage('Build-add2vals') { docker {
agent { image 'python:2-alpine'
docker {
image 'python:2-alpine'
}
}
steps {
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
}
} }
stage('Build-logfilemonitor') {
agent {
docker {
image 'python:2-alpine'
}
} }
steps { steps {
sh 'python -m py_compile sources/LogfileMonitor.py' sh 'python -m py_compile sources/add2vals.py sources/calc.py sources/LogfileMonitor.py'
}
}
} }
} }
stage('Test') { stage('Test') {
@ -46,41 +31,22 @@ pipeline {
} }
} }
stage('Deliver') { stage('Deliver') {
parallel { agent {
stage('Deliver-add2vals') { docker {
agent { image 'richardx/pyinstaller-linux:python2'
docker {
image 'richardx/pyinstaller-linux:python2'
}
}
post {
success {
archiveArtifacts 'dist/add2vals'
}
}
steps {
sh 'pyinstaller --onefile sources/add2vals.py'
}
} }
stage('Delivery-logfilemonitor') {
agent {
docker {
image 'richardx/pyinstaller-linux:python2'
}
}
post {
success {
archiveArtifacts 'dist/LogfileMonitor'
} }
} post {
steps { success {
sh 'pyinstaller --onefile sources/LogfileMonitor.py' archiveArtifacts 'dist/add2vals dist/LogfileMonitor'
}
} }
}
steps {
sh 'pyinstaller --onefile sources/add2vals.py'
sh 'pyinstaller --onefile sources/LogfileMonitor.py'
} }
} }
} }