pipeline { agent none // Scan for SCM changes at 10-minute intervals triggers { pollSCM(*/10 * * * *) } 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' } } } } }