logstash/x-pack/ci/integration_tests.sh
Andrea Selva 979ea21c5e
Introduce LS_JAVA_HOME environment variable (#13204)
This commit modifies the launch scripts to take care of the LS_JAVA_HOME giving precedence over the JAVA_HOME, which is still used it the first is not found.
2021-09-06 10:22:51 +02:00

20 lines
No EOL
906 B
Bash
Executable file

#!/bin/bash -ie
#Note - ensure that the -e flag is set to properly set the $? status if any command fails
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License;
# you may not use this file except in compliance with the Elastic License.
# Since we are using the system jruby, we need to make sure our jvm process
# uses at least 1g of memory, If we don't do this we can get OOM issues when
# installing gems. See https://github.com/elastic/logstash/issues/5179
export JRUBY_OPTS="-J-Xmx1g"
export GRADLE_OPTS="-Xmx4g -Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info"
export CI=true
if [ -n "$BUILD_JAVA_HOME" ]; then
GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.java.home=$BUILD_JAVA_HOME"
export LS_JAVA_HOME="$BUILD_JAVA_HOME"
fi
./gradlew runXPackIntegrationTests