Skip to content

Commit 2ee9cb0

Browse files
authored
Update java8 tests to run against java11 (GoogleCloudPlatform#2029)
* Update java8 tests to run against java11 * fix pom * add allowed java versions * remove sample
1 parent 79a3171 commit 2ee9cb0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.kokoro/java8/common.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ action {
3232
# Set the JAVA VERSION env var.
3333
env_vars: {
3434
key: "JAVA_VERSION"
35-
value: "1.8"
35+
value: "1.8, 11"
3636
}
3737

3838
# Configure the docker image for kokoro-trampoline.

.kokoro/tests/run_tests.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ for file in **/pom.xml; do
110110

111111
# Fail the tests if no Java version was found.
112112
POM_JAVA=$(grep -oP '(?<=<maven.compiler.target>).*?(?=</maven.compiler.target>)' pom.xml)
113-
if [[ "$POM_JAVA" = "" ]]; then
113+
ALLOWED_VERSIONS=("1.8" "11")
114+
if [[ "$POM_JAVA" = "" ]] || [[ ! "${ALLOWED_VERSIONS[@]}" =~ "${POM_JAVA}" ]]; then
114115
RTN=1
115116
echo -e "\n Testing failed: Unable to determine Java version. Please set in pom:"
116117
echo -e "\n<properties>"

0 commit comments

Comments
 (0)