feature/jenkinsfile

Test stage added
This commit is contained in:
kudlaty 2018-03-21 16:25:32 +01:00
parent e9d274845e
commit 01cf027d24

18
Jenkinsfile vendored
View file

@ -1,7 +1,7 @@
pipeline{ pipeline{
agent none agent none
stages { stages {
stage('Build'){ stage('Build') {
agent { agent {
docker { docker {
image 'python:2-alpine' image 'python:2-alpine'
@ -11,6 +11,22 @@ pipeline{
sh 'python -m py_compile sources/add2vals.py sources/calc.py' sh 'python -m py_compile sources/add2vals.py sources/calc.py'
} }
} }
stage('Test') {
agent {
docker {
image 'qnib/pytest'
}
}
steps {
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
}
post {
always {
junit 'test-reports/results.xml'
}
}
}
} }
} }