Add 'Test' stage
This commit is contained in:
parent
57e54be306
commit
c622ef6364
1 changed files with 19 additions and 4 deletions
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
|
@ -1,14 +1,29 @@
|
|||
pipeline {
|
||||
agent none
|
||||
agent none
|
||||
stages {
|
||||
stage('Build') {
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'python:2-alpine'
|
||||
image 'python:2-alpine'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue