X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-sonar.sh;h=9c82633c04b5493f1aab28f86d037bf7dbd98bca;hb=95dd6ce9f01825541ac0c1b6ed6fb3e4c095047c;hp=9d13003281c136f435630327790c3d7a16dc8f33;hpb=2866593326538d6cba981820f0e9b5ba99189492;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-sonar.sh b/shell/maven-sonar.sh index 9d130032..9c82633c 100644 --- a/shell/maven-sonar.sh +++ b/shell/maven-sonar.sh @@ -48,7 +48,7 @@ if [ "$SONAR_HOST_URL" = "https://sonarcloud.io" ]; then fi fi -if [ "$SET_JDK_VERSION" != "$SONARCLOUD_JAVA_VERSION" ]; then +if [ -n "$SONARCLOUD_JAVA_VERSION" ] && [ "$SET_JDK_VERSION" != "$SONARCLOUD_JAVA_VERSION" ]; then export SET_JDK_VERSION="$SONARCLOUD_JAVA_VERSION" bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh) source /tmp/java.env