From 1dd3187a3659ed47a8717a637bea6021bf85c538 Mon Sep 17 00:00:00 2001 From: DaWilliam Date: Sun, 4 Mar 2018 00:08:08 -0500 Subject: [PATCH] Second Step --- Jenkinsfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 665eba6..ec1cadf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,14 +1,29 @@ pipeline { - agent none + agent none stages { - stage('Build') { + stage('Build') { agent { docker { - image 'python:2-alpine' + image 'python:2-alpine' } } 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' + } } } }