Skip to content

Commit 6abbdb3

Browse files
committed
JAVA-2560 : Update Evergreen configuration
* Specify that Java 9 should be used for compilation in all scripts * Specify that the store type is JKS when running keytool, so that the generated trust store can be read by Java 6
1 parent 2a9e4d5 commit 6abbdb3

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

.evergreen/compile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ set -o errexit # Exit the script with error if any of the commands fail
77
# Main Program #
88
############################################
99

10-
echo "Compiling java driver with jdk8"
10+
echo "Compiling java driver with jdk9"
1111

1212
# We always compile with the latest version of java
13-
export JAVA_HOME="/opt/java/jdk8"
13+
export JAVA_HOME="/opt/java/jdk9"
1414
./gradlew -version
1515
./gradlew -PxmlReports.enabled=true --info -x test clean check jar testClasses docs

.evergreen/publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ echo ${RING_FILE_GPG_BASE64} | base64 -d > ${PROJECT_DIRECTORY}/secring.gpg
1212

1313
trap "rm ${PROJECT_DIRECTORY}/secring.gpg; exit" EXIT HUP
1414

15-
echo "Publishing snapshot with jdk8"
15+
echo "Publishing snapshot with jdk9"
1616

17-
export JAVA_HOME="/opt/java/jdk8"
17+
export JAVA_HOME="/opt/java/jdk9"
1818

1919
export ORG_GRADLE_PROJECT_nexusUsername=${NEXUS_USERNAME}
2020
export ORG_GRADLE_PROJECT_nexusPassword=${NEXUS_PASSWORD}

.evergreen/run-gssapi-auth-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -o errexit # Exit the script with error if any of the commands fail
66
# Supported/used environment variables:
77
# MONGODB_URI Set the URI, including username/password to use to connect to the server via PLAIN authentication mechanism
88
# JDK Set the version of java to be used. Java versions can be set from the java toolchain /opt/java
9-
# "jdk5", "jdk6", "jdk7", "jdk8"
9+
# "jdk5", "jdk6", "jdk7", "jdk8", "jdk9"
1010
# KDC The KDC
1111
# REALM The realm
1212
# KEYTAB_BASE64 The BASE64-encoded keytab
@@ -31,10 +31,10 @@ com.sun.security.jgss.krb5.initiate {
3131
};
3232
EOF
3333

34-
echo "Compiling java driver with jdk8"
34+
echo "Compiling java driver with jdk9"
3535

3636
# We always compile with the latest version of java
37-
export JAVA_HOME="/opt/java/jdk8"
37+
export JAVA_HOME="/opt/java/jdk9"
3838

3939
echo "Running tests with ${JDK}"
4040
./gradlew -version

.evergreen/run-plain-auth-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -o errexit # Exit the script with error if any of the commands fail
66
# Supported/used environment variables:
77
# MONGODB_URI Set the URI, including username/password to use to connect to the server via PLAIN authentication mechanism
88
# JDK Set the version of java to be used. Java versions can be set from the java toolchain /opt/java
9-
# "jdk5", "jdk6", "jdk7", "jdk8"
9+
# "jdk5", "jdk6", "jdk7", "jdk8", "jdk9"
1010

1111
JDK=${JDK:-jdk}
1212
JAVA_HOME="/opt/java/${JDK}"
@@ -18,7 +18,7 @@ JAVA_HOME="/opt/java/${JDK}"
1818
echo "Running PLAIN authentication tests"
1919

2020
# We always compile with the latest version of java
21-
export JAVA_HOME="/opt/java/jdk8"
21+
export JAVA_HOME="/opt/java/jdk9"
2222

2323
echo "Running tests with ${JDK}"
2424
./gradlew -version

.evergreen/run-socket-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set -o errexit # Exit the script with error if any of the commands fail
1010
# Supported values: "server", "replica_set", "sharded_cluster"
1111
# COMPRESSOR Set to enable compression. Values are "snappy" and "zlib" (default is no compression)
1212
# JDK Set the version of java to be used. Java versions can be set from the java toolchain /opt/java
13-
# "jdk5", "jdk6", "jdk7", "jdk8"
13+
# "jdk5", "jdk6", "jdk7", "jdk8", "jdk9"
1414

1515
AUTH=${AUTH:-noauth}
1616
MONGODB_URI=${MONGODB_URI:-}
@@ -49,7 +49,7 @@ fi
4949
echo "Running $AUTH tests over for $TOPOLOGY and connecting to $MONGODB_URI"
5050

5151
# We always compile with the latest version of java
52-
export JAVA_HOME="/opt/java/jdk8"
52+
export JAVA_HOME="/opt/java/jdk9"
5353

5454
echo "Running tests with ${JDK}"
5555
./gradlew -version

.evergreen/run-tests.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set -o errexit # Exit the script with error if any of the commands fail
1111
# Supported values: "server", "replica_set", "sharded_cluster"
1212
# COMPRESSOR Set to enable compression. Values are "snappy" and "zlib" (default is no compression)
1313
# JDK Set the version of java to be used. Java versions can be set from the java toolchain /opt/java
14-
# "jdk5", "jdk6", "jdk7", "jdk8"
14+
# "jdk5", "jdk6", "jdk7", "jdk8", "jdk9"
1515

1616
AUTH=${AUTH:-noauth}
1717
SSL=${SSL:-nossl}
@@ -28,6 +28,10 @@ else
2828
export ASYNC_TYPE="-Dorg.mongodb.async.type=nio2"
2929
fi
3030

31+
# We always compile with the latest version of java
32+
export JAVA_HOME="/opt/java/jdk9"
33+
34+
3135
############################################
3236
# Functions #
3337
############################################
@@ -40,7 +44,7 @@ provision_ssl () {
4044
openssl pkcs12 -CAfile ${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem -export -in ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem -out client.pkc -password pass:bithere
4145
fi
4246
if [ ! -f mongo-truststore ]; then
43-
echo "y" | ${JAVA_HOME}/bin/keytool -importcert -trustcacerts -file ${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem -keystore mongo-truststore -storepass hithere
47+
${JAVA_HOME}/bin/keytool -importcert -trustcacerts -file ${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem -keystore mongo-truststore -storepass hithere -storetype JKS -noprompt
4448
fi
4549

4650
# We add extra gradle arguments for SSL
@@ -82,9 +86,6 @@ if [ "$SSL" != "nossl" ]; then
8286
fi
8387
echo "Running $AUTH tests over $SSL for $TOPOLOGY and connecting to $MONGODB_URI"
8488

85-
# We always compile with the latest version of java
86-
export JAVA_HOME="/opt/java/jdk8"
87-
8889
echo "Running tests with ${JDK}"
8990
./gradlew -version
9091
./gradlew -PjdkHome=/opt/java/${JDK} -Dorg.mongodb.test.uri=${MONGODB_URI} ${GRADLE_EXTRA_VARS} ${ASYNC_TYPE} --stacktrace --info test

0 commit comments

Comments
 (0)