From 8a3181ceedeee6629f79d4446d7aa74f94e66e88 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Mon, 19 Dec 2016 19:53:00 +0200 Subject: [PATCH] [ci] Add jdk9 target to the dev-tools/ci script To add support for jdk9 tests for x-pack we need a number of parameters for the jvm, passed in the gradle command. To resolve issues with arg passing through bash variables and improve readability, switch to an array construct for storing the arguments. Add new jdk9 target to allow execution of jdk-9-ea based tests in the CI infra. Relates: elastic/elasticsearch#4415 Relates: https://github.com/elastic/infra/issues/1573#issuecomment-267832307 Original commit: elastic/x-pack-elasticsearch@b41e5f4b98f84f7e8503f8d7c64f2bc28771b7f3 --- dev-tools/ci | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/dev-tools/ci b/dev-tools/ci index 2471aa67c46..56813ae4b16 100755 --- a/dev-tools/ci +++ b/dev-tools/ci @@ -26,10 +26,29 @@ set -o pipefail key=${1-check} case $key in packagingTest) - GRADLE_OPT_STRING="--info -Pvagrant.boxes=all :x-pack:qa:vagrant:packagingTest" + GRADLE_CLI_ARGS=( + "--info" + "-Pvagrant.boxes=all" + ":x-pack:qa:vagrant:packagingTest" + ) ;; check) - GRADLE_OPT_STRING="--info check -Dtests.network=true -Dtests.badapples=true" + GRADLE_CLI_ARGS=( + "--info" + "check" + "-Dtests.network=true" + "-Dtests.badapples=true" + ) + ;; + jdk9) + GRADLE_CLI_ARGS=( + "-Pxpack.kibana.build=false" + "--info" + "check" + "-Dtests.network=true" + "-Dtests.badapples=true" + '-Dtests.jvm.argline="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/javax.net.ssl=ALL-UNNAMED"' + ) ;; *) echo "Unsupported cli argument $1. Allowed arguments are packagingTest or check. No argument defaults to check." @@ -118,6 +137,6 @@ set -xuf gradle --stacktrace clean # Actually run the tests -gradle $GRADLE_OPT_STRING +gradle "${GRADLE_CLI_ARGS[@]}" # ~*~ shell-script-mode ~*~