Add Jenkinsfile
This commit is contained in:
parent
6f69a87299
commit
061820190c
1 changed files with 15 additions and 13 deletions
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
|
|
@ -1,28 +1,30 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent none //1
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage('Build') { //2
|
stage('Build') {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'python:3-alpine' //3
|
image 'python:2-alpine'
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Test') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'qnib/pytest'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
|
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 {
|
post {
|
||||||
always {
|
always {
|
||||||
junit 'test-reports/results.xml'
|
junit 'test-reports/results.xml' //4
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue