From 0f64018b52f2ef37c0872953439b19ef3223cb88 Mon Sep 17 00:00:00 2001 From: labourde Date: Tue, 14 Dec 2021 11:14:02 +0100 Subject: [PATCH] edited Jenkinsfile with dockzr --- jenkins/Jenkinsfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index f48cbe9..9d16057 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -2,12 +2,22 @@ pipeline { agent none stages { stage('Build') { - steps { + agent { + docker { + image 'python:2-alpine' + } + } + steps { sh 'python -m py_compile sources/add2vals.py sources/calc.py' stash(name: 'compiled-results', includes: 'sources/*.py') } } stage('Test') { + agent { + docker { + image 'python:2-alpine' + } + } steps { sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py' } @@ -18,6 +28,11 @@ pipeline { } } stage('Deliver') { + agent { + docker { + image 'python:2-alpine' + } + } steps { sh 'pyinstaller --onefile sources/add2vals.py' }