Merge 604c1a036e
into 128e9ba59f
This commit is contained in:
commit
2cc88fd28c
2 changed files with 34 additions and 0 deletions
32
Jenkinsfile
vendored
Normal file
32
Jenkinsfile
vendored
Normal 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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ the calc.py library's 'add2' function.
|
||||||
import sys
|
import sys
|
||||||
import calc
|
import calc
|
||||||
|
|
||||||
|
# Some Comment here
|
||||||
|
|
||||||
argnumbers = len(sys.argv) - 1
|
argnumbers = len(sys.argv) - 1
|
||||||
|
|
||||||
if argnumbers == 2 :
|
if argnumbers == 2 :
|
||||||
|
|
Loading…
Reference in a new issue