default to openjdk11
before calling sonarcloud upload.
sonar cloud upload will stop working
with java8 on october 1st
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I8c321b053a86e1f15149552af25b775353051444
--- /dev/null
+---
+deprecations:
+ - |
+ Cmake builds upload to SonarCloud. Fix build env to use openjdk11
+ sonarcloud upload will stop working with java8 on October 1st 2020
set -ex -o pipefail
+SET_JDK_VERSION="${SET_JDK_VERSION:-openjdk11}"
+echo "$SET_JDK_VERSION"
+bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh)
+# shellcheck disable=SC1091
+source /tmp/java.env
+
cd /tmp || exit 1
wget -q -O /tmp/sonar-scan.zip \
"https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip"
unzip -q bw.zip
sudo mv build-wrapper-* /opt/build-wrapper
+
+SET_JDK_VERSION="${SET_JDK_VERSION:-openjdk11}"
+echo "$SET_JDK_VERSION"
+bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh)
+# shellcheck disable=SC1091
+source /tmp/java.env
+
mkdir -p "$build_dir"
cd "$build_dir" || exit 1