Project

General

Profile

0001-Jenkinsfile-use-a-TMPDIR-for-tox-31437.patch

Benjamin Dauvergne, 14 Mar 2019 08:43 PM

Download (1.42 KB)

View differences:

Subject: [PATCH 1/2] Jenkinsfile: use a TMPDIR for tox (#31437)

 Jenkinsfile | 5 +++++
 tox.ini     | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
Jenkinsfile
3 3
pipeline {
4 4
    agent any
5 5
    options { disableConcurrentBuilds() }
6
    environment {
7
        TMPDIR = "/tmp/$BUILD_TAG"
8
    }
6 9
    stages {
7 10
        stage('Unit Tests') {
8 11
            steps {
12
                sh "mkdir ${env.TMPDIR}"
9 13
                sh './jenkins.sh'
10 14
            }
11 15
            post {
......
35 39
    }
36 40
    post {
37 41
        always {
42
            sh "rm -rf ${env.TMPDIR}"
38 43
            script {
39 44
                utils = new Utils()
40 45
                utils.mail_notify(currentBuild, env, 'admin+jenkins-authentic@entrouvert.com')
tox.ini
4 4
# and then run "tox" from this directory.
5 5

  
6 6
[tox]
7
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/{env:BRANCH_NAME:}
7
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/
8 8
envlist = py27-coverage-{dj18,dj111}-authentic-{pg,sqlite}-{oldldap,},py27-coverage-{dj18,dj111}-rbac-{pg,sqlite}
9 9

  
10 10
[testenv]
11
-