| #!/bin/bash |
| |
| # exit on errors |
| set -eu -o pipefail |
| |
| if [ ${GERRIT_BRANCH} == "master" ] |
| then |
| BAZEL_VERSION="0.19.2" |
| else |
| if [ ${GERRIT_BRANCH} == "master" ]; then |
| BAZEL_VERSION="0.27.0" |
| else |
| BAZEL_VERSION="0.24.1" |
| fi |
| fi |
| |
| if [ ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "onos-2.2" ] |
| then |
| echo Installing OPEN JDK 11 |
| curl -L -o jdk.tar.gz -s https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz |
| tar xf jdk.tar.gz |
| export JAVA_HOME="$HOME/zulu11.31.11-ca-jdk11.0.3-linux_x64" |
| PATH="$JAVA_HOME/bin:$PATH" |
| which java |
| else |
| echo Using default JDK |
| fi |
| |
| |