From 9148c54222b6c0c401c85d9e34bedb6200559e4c Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 14 Mar 2019 20:40:20 +0100 Subject: [PATCH 1/2] Jenkinsfile: use a TMPDIR for tox (#31437) --- Jenkinsfile | 5 +++++ tox.ini | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 705938a3..405e1223 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,9 +3,13 @@ pipeline { agent any options { disableConcurrentBuilds() } + environment { + TMPDIR = "/tmp/$BUILD_TAG" + } stages { stage('Unit Tests') { steps { + sh "mkdir ${env.TMPDIR}" sh './jenkins.sh' } post { @@ -35,6 +39,7 @@ pipeline { } post { always { + sh "rm -rf ${env.TMPDIR}" script { utils = new Utils() utils.mail_notify(currentBuild, env, 'admin+jenkins-authentic@entrouvert.com') diff --git a/tox.ini b/tox.ini index 2bb934c3..cd27641c 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/{env:BRANCH_NAME:} +toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/ envlist = py27-coverage-{dj18,dj111}-authentic-{pg,sqlite}-{oldldap,},py27-coverage-{dj18,dj111}-rbac-{pg,sqlite} [testenv] -- 2.20.1