Add Jenkinsfile

This commit is contained in:
Samira Ouaaz 2021-11-17 00:38:35 -05:00
parent 6f69a87299
commit 061820190c

28
Jenkinsfile vendored
View file

@ -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
} }
} }
} }
} }
} }
}