edited Jenkinsfile with dockzr
This commit is contained in:
parent
a06f159dd8
commit
0f64018b52
1 changed files with 16 additions and 1 deletions
15
jenkins/Jenkinsfile
vendored
15
jenkins/Jenkinsfile
vendored
|
@ -2,12 +2,22 @@ pipeline {
|
||||||
agent none
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'python:2-alpine'
|
||||||
|
}
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
|
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
|
||||||
stash(name: 'compiled-results', includes: 'sources/*.py')
|
stash(name: 'compiled-results', includes: 'sources/*.py')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'python:2-alpine'
|
||||||
|
}
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
|
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
|
||||||
}
|
}
|
||||||
|
@ -18,6 +28,11 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deliver') {
|
stage('Deliver') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'python:2-alpine'
|
||||||
|
}
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'pyinstaller --onefile sources/add2vals.py'
|
sh 'pyinstaller --onefile sources/add2vals.py'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue