Skip to content

Commit 8fb0053

Browse files
authored
Fix jenkins tests after upgrade (datastax#607)
1 parent c004fcb commit 8fb0053

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

Jenkinsfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ def executeTests(perCommitSchedule) {
263263
. ${HOME}/environment.txt
264264
set +o allexport
265265
266+
# Fix Java version at Java8 for now because of dependencies in DSE.
267+
# TODO: This should last us through testing against Cassandra 4.1.x at least but
268+
# will eventually need to be made more generic.
269+
. ${JABBA_SHELL}
270+
jabba use 1.8
271+
266272
mono ./testrunner/NUnit.ConsoleRunner.3.6.1/tools/nunit3-console.exe src/Cassandra.IntegrationTests/bin/Release/net462/Cassandra.IntegrationTests.dll --where "$MONO_TEST_FILTER" --labels=All --result:"TestResult_nunit.xml"
267273
'''
268274
}
@@ -276,7 +282,15 @@ def executeTests(perCommitSchedule) {
276282
set -o allexport
277283
. ${HOME}/environment.txt
278284
set +o allexport
279-
export OPENSSL_CONF=/home/jenkins/openssl.cnf
285+
286+
# Fix Java version at Java8 for now because of dependencies in DSE.
287+
# TODO: This should last us through testing against Cassandra 4.1.x at least but
288+
# will eventually need to be made more generic.
289+
. ${JABBA_SHELL}
290+
jabba use 1.8
291+
292+
export OPENSSL_CONF=/home/jenkins/openssl.cnf
293+
280294
dotnet test src/Cassandra.IntegrationTests/Cassandra.IntegrationTests.csproj -v n -f ${DOTNET_VERSION} -c Release --filter $DOTNET_TEST_FILTER --logger "xunit;LogFilePath=../../TestResult_xunit.xml"
281295
'''
282296
}
@@ -395,6 +409,7 @@ pipeline {
395409
SIMULACRON_PATH_WINDOWS = 'C:\\Users\\Admin\\simulacron.jar'
396410
CCM_ENVIRONMENT_SHELL = '/usr/local/bin/ccm_environment.sh'
397411
CCM_ENVIRONMENT_SHELL_WINDOWS = '/mnt/c/Users/Admin/ccm_environment.sh'
412+
JABBA_SHELL = '/usr/lib/jabba/jabba.sh'
398413
BuildAllTargets = 'True'
399414
RunCodeAnalyzers = 'True'
400415
}

Jenkinsfile.scheduled

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ def initializeEnvironment() {
8686
gci env:* | sort-object name
8787
'''
8888
} else {
89-
sh label: 'Copy SSL files', script: '''#!/bin/bash -le
90-
cp -r ${HOME}/ccm/ssl $HOME/ssl
91-
'''
92-
9389
sh label: 'Download Apache Cassandra® or DataStax Enterprise', script: '''#!/bin/bash -le
9490
. ${CCM_ENVIRONMENT_SHELL} ${SERVER_VERSION}
9591
@@ -266,6 +262,12 @@ def executeTests(perCommitSchedule) {
266262
. ${HOME}/environment.txt
267263
set +o allexport
268264
265+
# Fix Java version at Java8 for now because of dependencies in DSE.
266+
# TODO: This should last us through testing against Cassandra 4.1.x at least but
267+
# will eventually need to be made more generic.
268+
. ${JABBA_SHELL}
269+
jabba use 1.8
270+
269271
mono ./testrunner/NUnit.ConsoleRunner.3.6.1/tools/nunit3-console.exe src/Cassandra.IntegrationTests/bin/Release/net462/Cassandra.IntegrationTests.dll --where "$MONO_TEST_FILTER" --labels=All --result:"TestResult_nunit.xml"
270272
'''
271273
}
@@ -280,6 +282,14 @@ def executeTests(perCommitSchedule) {
280282
. ${HOME}/environment.txt
281283
set +o allexport
282284
285+
# Fix Java version at Java8 for now because of dependencies in DSE.
286+
# TODO: This should last us through testing against Cassandra 4.1.x at least but
287+
# will eventually need to be made more generic.
288+
. ${JABBA_SHELL}
289+
jabba use 1.8
290+
291+
export OPENSSL_CONF=/home/jenkins/openssl.cnf
292+
283293
dotnet test src/Cassandra.IntegrationTests/Cassandra.IntegrationTests.csproj -v n -f ${DOTNET_VERSION} -c Release --filter $DOTNET_TEST_FILTER --logger "xunit;LogFilePath=../../TestResult_xunit.xml"
284294
'''
285295
}
@@ -420,6 +430,7 @@ pipeline {
420430
SIMULACRON_PATH_WINDOWS = 'C:\\Users\\Admin\\simulacron.jar'
421431
CCM_ENVIRONMENT_SHELL = '/usr/local/bin/ccm_environment.sh'
422432
CCM_ENVIRONMENT_SHELL_WINDOWS = '/mnt/c/Users/Admin/ccm_environment.sh'
433+
JABBA_SHELL = '/usr/lib/jabba/jabba.sh'
423434
BuildAllTargets = 'True'
424435
RunCodeAnalyzers = 'True'
425436
}

0 commit comments

Comments
 (0)