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

Commit 9043358

Browse files
committed
Add new test server env vars
1 parent 0ea5e68 commit 9043358

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Jenkinsfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ def runTests(testEnv, isServiceTests) {
2727

2828
//Set up the environment and run the tests
2929
withEnv(testEnv) {
30-
withCredentials([(env.CREDS_ID.contains('iam')) ? string(credentialsId: env.CREDS_ID, variable: 'IAM_API_KEY') : usernamePassword(credentialsId: env.CREDS_ID, usernameVariable: 'DB_USER', passwordVariable: 'DB_PASSWORD')]) {
30+
withCredentials([(env.CREDS_ID.contains('Iam')) ? string(credentialsId: env.CREDS_ID, variable: 'IAM_API_KEY') : usernamePassword(credentialsId: env.CREDS_ID, usernameVariable: 'DB_USER', passwordVariable: 'DB_PASSWORD')]) {
3131
try {
32-
sh "./gradlew ${(env.DB_USER?.trim()) ? '-Dtest.server.user=$DB_USER -Dtest.server.password=$DB_PASSWORD' : ''} -Dtest.server.host=\$DB_HOST -Dtest.server.port=\$DB_PORT -Dtest.server.protocol=\$DB_HTTP \$GRADLE_TARGET"
32+
sh "./gradlew \
33+
${(env.DB_USER?.trim()) ? '-Dtest.server.user=$DB_USER -Dtest.server.password=$DB_PASSWORD' : ''} \
34+
-Dtest.server.host=\$DB_HOST \
35+
-Dtest.server.port=\$DB_PORT \
36+
-Dtest.server.protocol=\$DB_HTTP \
37+
-Dtest.replication.source.url=\$SDKS_TEST_SERVER_URL \
38+
\$GRADLE_TARGET"
3339
} finally {
3440
junit '**/build/test-results/**/*.xml'
3541
}
@@ -49,8 +55,8 @@ stage('Build') {
4955

5056
stage('QA') {
5157
// Define the matrix environments
52-
def CLOUDANT_ENV = ['DB_HTTP=https', 'DB_HOST=clientlibs-test.cloudant.com', 'DB_PORT=443', 'DB_IGNORE_COMPACTION=true', 'CREDS_ID=clientlibs-test']
53-
def CLOUDANT_IAM_ENV = ['DB_HTTP=https', 'DB_HOST=clientlibs-test.cloudant.com', 'DB_PORT=443', 'DB_IGNORE_COMPACTION=true', 'CREDS_ID=clientlibs-test-iam', "TEST_IAM_TOKEN_URL=${SDKS_TEST_IAM_URL}"]
58+
def CLOUDANT_ENV = ['DB_HTTP=https', "DB_HOST=${SDKS_TEST_SERVER_HOST}", 'DB_PORT=443', 'DB_IGNORE_COMPACTION=true', 'CREDS_ID=testServerLegacy']
59+
def CLOUDANT_IAM_ENV = ['DB_HTTP=https', "DB_HOST=${SDKS_TEST_SERVER_HOST}", 'DB_PORT=443', 'DB_IGNORE_COMPACTION=true', 'CREDS_ID=testServerIamApiKey', "TEST_IAM_TOKEN_URL=${SDKS_TEST_IAM_URL}"]
5460
def COUCH1_6_ENV = ['DB_HTTP=http', 'DB_HOST=cloudantsync002.bristol-victoria.uk.ibm.com', 'DB_PORT=5984', 'DB_IGNORE_COMPACTION=false', 'CREDS_ID=couchdb']
5561
def COUCH2_0_ENV = ['DB_HTTP=http', 'DB_HOST=cloudantsync002.bristol-victoria.uk.ibm.com', 'DB_PORT=5985', 'DB_IGNORE_COMPACTION=true', 'CREDS_ID=couchdb']
5662
def CLOUDANT_LOCAL_ENV = ['DB_HTTP=http', 'DB_HOST=cloudantsync002.bristol-victoria.uk.ibm.com', 'DB_PORT=8081', 'DB_IGNORE_COMPACTION=true', 'CREDS_ID=couchdb']

0 commit comments

Comments
 (0)