From 6415572f3d7b8169eb8da3d862f5a356204ca63b Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Tue, 24 May 2022 23:24:01 +0200 Subject: [PATCH] CI: Make HOME environment hack less intrusive --- Jenkinsfile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2644e4a9b..188b9095a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,20 +27,21 @@ pys.each { py -> def image = docker.image('docker.io/python:' + py.docker) image.pull() image.inside { - withEnv(['HOME=' + pwd(tmp: true)]) { - warnError('tox failed') { - sh """ - pip install --no-warn-script-location tox - python -m tox -e $py.tox - """ - } + def tmpDir = pwd(tmp: true) + warnError('tox failed') { + sh """ + HOME='$tmpDir' + pip install --no-warn-script-location tox + python -m tox -e $py.tox + """ + } - if (py.main) { - sh """ - pip install --no-warn-script-location build - python -m build - """ - } + if (py.main) { + sh """ + HOME='$tmpDir' + pip install --no-warn-script-location build + python -m build + """ } }