comparison Jenkinsfile @ 6552:15a12f2a47b4

jenkinsfile: delete all old files in the workspace Especial important when files have been renamed and there are *.pyc files left over from the last build.
author domruf <dominikruf@gmail.com>
date Fri, 24 Mar 2017 20:15:07 +0100
parents bc1b11a5d548
children 8a60eb2b7603
comparison
equal deleted inserted replaced
6551:bc1b11a5d548 6552:15a12f2a47b4
62 } 62 }
63 } 63 }
64 def pytests = [:] 64 def pytests = [:]
65 pytests['sqlite'] = { 65 pytests['sqlite'] = {
66 ws { 66 ws {
67 deleteDir()
67 unstash name: 'kallithea' 68 unstash name: 'kallithea'
68 if (isUnix()) { 69 if (isUnix()) {
69 sh script: """$activatevirtualenv 70 sh script: """$activatevirtualenv
70 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_sqlite.xml --cov=kallithea --cov-report xml 71 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_sqlite.xml --cov=kallithea --cov-report xml
71 """, returnStatus: true 72 """, returnStatus: true
87 } 88 }
88 } 89 }
89 if (isUnix()) { 90 if (isUnix()) {
90 pytests['de'] = { 91 pytests['de'] = {
91 ws { 92 ws {
93 deleteDir()
92 unstash name: 'kallithea' 94 unstash name: 'kallithea'
93 withEnv(['LANG=de_DE.UTF-8', 95 withEnv(['LANG=de_DE.UTF-8',
94 'LANGUAGE=de', 96 'LANGUAGE=de',
95 'LC_ADDRESS=de_DE.UTF-8', 97 'LC_ADDRESS=de_DE.UTF-8',
96 'LC_IDENTIFICATION=de_DE.UTF-8', 98 'LC_IDENTIFICATION=de_DE.UTF-8',
111 junit 'pytest_de.xml' 113 junit 'pytest_de.xml'
112 } 114 }
113 } 115 }
114 pytests['mysql'] = { 116 pytests['mysql'] = {
115 ws { 117 ws {
118 deleteDir()
116 unstash name: 'kallithea' 119 unstash name: 'kallithea'
117 sh """$activatevirtualenv 120 sh """$activatevirtualenv
118 pip install --upgrade MySQL-python 121 pip install --upgrade MySQL-python
119 """ 122 """
120 withEnv(['TEST_DB=mysql://kallithea:kallithea@jenkins_mysql/kallithea_test?charset=utf8']) { 123 withEnv(['TEST_DB=mysql://kallithea:kallithea@jenkins_mysql/kallithea_test?charset=utf8']) {
133 junit 'pytest_mysql.xml' 136 junit 'pytest_mysql.xml'
134 } 137 }
135 } 138 }
136 pytests['postgresql'] = { 139 pytests['postgresql'] = {
137 ws { 140 ws {
141 deleteDir()
138 unstash name: 'kallithea' 142 unstash name: 'kallithea'
139 sh """$activatevirtualenv 143 sh """$activatevirtualenv
140 pip install --upgrade psycopg2 144 pip install --upgrade psycopg2
141 """ 145 """
142 withEnv(['TEST_DB=postgresql://kallithea:kallithea@jenkins_postgresql/kallithea_test']) { 146 withEnv(['TEST_DB=postgresql://kallithea:kallithea@jenkins_postgresql/kallithea_test']) {