From: nauman Date: Wed, 18 Jan 2023 17:06:13 +0000 (+0000) Subject: Set Java 11 as default version for onap worker X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F58%2F16758%2F1;p=infra%2Ftools.git Set Java 11 as default version for onap worker Change-Id: Icf490345e0d7fbc852ab7a665ca60d578fd3e9c4 --- diff --git a/infra/jenkins/slave-setup/nordix-onap-jenkins-build-server/configure-image.sh b/infra/jenkins/slave-setup/nordix-onap-jenkins-build-server/configure-image.sh index d3b6f99..fbcf1dc 100644 --- a/infra/jenkins/slave-setup/nordix-onap-jenkins-build-server/configure-image.sh +++ b/infra/jenkins/slave-setup/nordix-onap-jenkins-build-server/configure-image.sh @@ -95,14 +95,13 @@ sudo -H -E apt autoremove -y echo "Info : Install additional Java version" # INSTALL additional Java 11 and 12 while keep pointing alternatives to JDK8 -sudo cp -R /etc/alternatives /etc/keep-alternatives sudo add-apt-repository -y ppa:openjdk-r/ppa sudo apt-get update sudo -H -E apt -y -q=3 install \ openjdk-11-jdk \ openjdk-12-jdk -sudo rm -rf /etc/alternatives -sudo mv /etc/keep-alternatives /etc/alternatives +# set java 11 as default version +sudo update-java-alternatives -s java-1.11.0-openjdk-amd64 java -version echo "Info : Enable time sync"