Add initial Jenkinsfile2

This commit is contained in:
riyadgh 2020-02-14 01:48:39 -05:00
parent 8191fe7346
commit 71dd518228

23
Jenkinsfile vendored
View file

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