Jenkins file update
This commit is contained in:
parent
da04b4d572
commit
651030966a
1 changed files with 43 additions and 6 deletions
37
Jenkinsfile
vendored
37
Jenkinsfile
vendored
|
|
@ -1,5 +1,8 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent none
|
||||||
|
options {
|
||||||
|
skipStagesAfterUnstable()
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
agent {
|
agent {
|
||||||
|
|
@ -12,5 +15,39 @@ pipeline {
|
||||||
stash(name: 'compiled-results', includes: 'sources/*.py*')
|
stash(name: 'compiled-results', includes: 'sources/*.py*')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Test') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'qnib/pytest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'py.test --junit-xml test-reports/results.xml sources/test_calc.py'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit 'test-reports/results.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deliver') {
|
||||||
|
agent any
|
||||||
|
environment {
|
||||||
|
VOLUME = '$(pwd)/sources:/src'
|
||||||
|
IMAGE = 'cdrx/pyinstaller-linux:python2'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
dir(path: env.BUILD_ID) {
|
||||||
|
unstash(name: 'compiled-results')
|
||||||
|
sh "docker run --rm -v ${VOLUME} ${IMAGE} 'pyinstaller -F add2vals.py'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
archiveArtifacts "${env.BUILD_ID}/sources/dist/add2vals"
|
||||||
|
sh "docker run --rm -v ${VOLUME} ${IMAGE} 'rm -rf build dist'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue