Use Java 11 for release builds on release 2.2 and greater
Change-Id: I740544216c305ece7df9b46bdb51a040bcc53b1d
diff --git a/jjb/onos/onos-bazel-release-build.sh b/jjb/onos/onos-bazel-release-build.sh
index de54526..a32f30d 100644
--- a/jjb/onos/onos-bazel-release-build.sh
+++ b/jjb/onos/onos-bazel-release-build.sh
@@ -8,6 +8,16 @@
PATH=$PATH:/home/jenkins/bin
+# set up JDK 11 if needed
+if [ ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "onos-2.2" ]
+then
+ echo Installing OPEN JDK 11
+ sudo update-java-alternatives -s java-11-amazon-corretto
+ java -version
+else
+ echo Using default JDK
+fi
+
# import GPG key
gpg --import jenkins.key