onos/tools/dev/bin/cell-jdk11
Thomas Vachuska 9ccb5faa32 Added a tool to set default JDK to 11 on test cells.
Change-Id: Ie9b983460afa634a2599ff633c3a0a5673eb91dc
2019-06-25 21:07:14 +00:00

16 lines
582 B
Bash
Executable File

#!/bin/bash
# -----------------------------------------------------------------------------
# Tool to set JDK11 as the default JDK on all machines of borrowed test cell.
# -----------------------------------------------------------------------------
# Check environment
[ -z "$ONOS_INSTANCES" ] && echo "Cell environment not established" && exit 1
for n in $ONOS_INSTANCES $ONOS_CORES; do
echo $n:
ssh sdn@$n "
sudo update-java-alternatives -s java-1.11.0-openjdk-amd64
echo 'export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64' > .bash_aliases
"
done