Fix problems locating JDK 11 on the path
Change-Id: I959728c5b42ef681b90b91b01bddb6c5b1f35c64
diff --git a/jjb/onos/install-jdk.sh b/jjb/onos/install-jdk.sh
deleted file mode 100644
index ed22bf4..0000000
--- a/jjb/onos/install-jdk.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/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
- sudo update-java-alternatives -s java-1.11.0-openjdk-amd64
- which java
-else
- echo Using default JDK
-fi
-
-
diff --git a/jjb/onos/onos-release-build-verify.sh b/jjb/onos/onos-release-build-verify.sh
index 58ffdd4..1f8d1a8 100644
--- a/jjb/onos/onos-release-build-verify.sh
+++ b/jjb/onos/onos-release-build-verify.sh
@@ -9,6 +9,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-1.11.0-openjdk-amd64
+ which java
+else
+ echo Using default JDK
+fi
+
# import GPG key
gpg --import jenkins.key
diff --git a/jjb/onos/onos-release-build.sh b/jjb/onos/onos-release-build.sh
index d2bda26..b01940a 100644
--- a/jjb/onos/onos-release-build.sh
+++ b/jjb/onos/onos-release-build.sh
@@ -9,6 +9,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-1.11.0-openjdk-amd64
+ which java
+else
+ echo Using default JDK
+fi
+
# import GPG key
gpg --import jenkins.key
diff --git a/jjb/onos/onos-verify.yaml b/jjb/onos/onos-verify.yaml
index 9a7f90d..af3cd83 100644
--- a/jjb/onos/onos-verify.yaml
+++ b/jjb/onos/onos-verify.yaml
@@ -447,7 +447,6 @@
#put shell scripts in file then make sure shell check is installed on verify vms
- shell: !include-raw-escape: install-bazel.sh
- - shell: !include-raw-escape: install-jdk.sh
- shell: !include-raw-escape: onos-release-build-verify.sh
# JJB 1.6.2 does not support parameter expansion on filename?
#- shell: !include-raw-escape: {project-name}-verify.sh
@@ -522,7 +521,6 @@
#put shell scripts in file then make sure shell check is installed on verify vms
- shell: !include-raw-escape: install-bazel.sh
- - shell: !include-raw-escape: install-jdk.sh
- shell: !include-raw-escape: onos-bazel-release-build.sh
# JJB 1.6.2 does not support parameter expansion on filename?
#- shell: !include-raw-escape: {project-name}-verify.sh