Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit ecd204f

Browse files
authored
Merge pull request #540 from cloudant/fix-jenkinsfile-testenv
Make a local copy of testEnv in runTests
2 parents 82e3e96 + c285afc commit ecd204f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Jenkinsfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,21 @@
1616

1717
def runTests(testEnv, isAndroid) {
1818
node(isAndroid ? 'android' : null) {
19+
// make a copy of the env
20+
def localTestEnv = []
21+
localTestEnv.addAll(testEnv)
1922
if (isAndroid) {
2023
// Android tests run on static hardware so clean the dir
2124
deleteDir()
22-
testEnv.add('GRADLE_TARGET=-b AndroidTest/build.gradle uploadFixtures connectedCheck')
25+
localTestEnv.add('GRADLE_TARGET=-b AndroidTest/build.gradle uploadFixtures connectedCheck')
2326
} else {
24-
testEnv.add('GRADLE_TARGET=integrationTest')
27+
localTestEnv.add('GRADLE_TARGET=integrationTest')
2528
}
2629
// Unstash the built content
2730
unstash name: 'built'
2831

2932
//Set up the environment and run the tests
30-
withEnv(testEnv) {
33+
withEnv(localTestEnv) {
3134
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: env.CREDS_ID, usernameVariable: 'DB_USER', passwordVariable: 'DB_PASSWORD']]) {
3235
try {
3336
sh './gradlew -Dtest.with.specified.couch=true -Dtest.couch.username=$DB_USER -Dtest.couch.password=$DB_PASSWORD -Dtest.couch.host=$DB_HOST -Dtest.couch.port=$DB_PORT -Dtest.couch.http=$DB_HTTP -Dtest.couch.ignore.compaction=$DB_IGNORE_COMPACTION -Dtest.couch.ignore.auth.headers=true $GRADLE_TARGET'

0 commit comments

Comments
 (0)