Skip to content

Commit b37935e

Browse files
committed
Temporaily provision JDK 11 in packaging tests
1 parent f4a7816 commit b37935e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Vagrantfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ def linux_common(config,
246246
touch /is_vagrant_vm # for consistency between linux and windows
247247
SHELL
248248

249+
config.vm.provision 'jdk-11', type: 'shell', inline: <<-SHELL
250+
curl -sSL https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz | tar xz -C /opt/
251+
SHELL
252+
249253
# This prevents leftovers from previous tests using the
250254
# same VM from messing up the current test
251255
config.vm.provision 'clean es installs in tmp', run: 'always', type: 'shell', inline: <<-SHELL
@@ -342,10 +346,11 @@ def sh_install_deps(config,
342346
}
343347
cat \<\<JAVA > /etc/profile.d/java_home.sh
344348
if [ -z "\\\$JAVA_HOME" ]; then
345-
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))
349+
export JAVA_HOME=/opt/jdk-11.0.2
346350
fi
347351
export SYSTEM_JAVA_HOME=\\\$JAVA_HOME
348352
unset JAVA_HOME
353+
export PATH=/opt/jdk-11.0.2/bin:\\\$PATH
349354
JAVA
350355
ensure tar
351356
ensure curl

0 commit comments

Comments
 (0)