mod Jenkinsfile

This commit is contained in:
Samira Ouaaz 2021-11-17 22:47:42 -05:00
parent bea1319e7c
commit 838dc9b5ec

23
Jenkinsfile vendored
View file

@ -1,14 +1,29 @@
pipeline {
agent none //1
agent none
stages {
stage('Build') { //2
stage('Build') {
agent {
docker {
image 'python:2-alpine' //3
image 'python:2-alpine'
}
}
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
}
}
}
}