This commit is contained in:
gourteacher 2021-11-18 01:09:22 -05:00 committed by GitHub
commit 2cc88fd28c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

32
Jenkinsfile vendored Normal file
View file

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

View file

@ -6,6 +6,8 @@ the calc.py library's 'add2' function.
import sys
import calc
# Some Comment here
argnumbers = len(sys.argv) - 1
if argnumbers == 2 :