mod Jenkinsfile
This commit is contained in:
parent
bea1319e7c
commit
838dc9b5ec
1 changed files with 19 additions and 4 deletions
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
|
|
@ -1,14 +1,29 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent none //1
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage('Build') { //2
|
stage('Build') {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'python:2-alpine' //3
|
image 'python:2-alpine'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'python -m py_compile sources/add2vals.py sources/calc.py' //4
|
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') { //1
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'qnib/pytest' //2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py' //3
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit 'test-reports/results.xml' //4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue