From 99b1f987bca8db754aa495e1eac6af8f2e9f927b Mon Sep 17 00:00:00 2001 From: nauman Date: Wed, 18 Jan 2023 17:06:13 +0000 Subject: [PATCH] Set Java 11 as default version for onap worker Change-Id: Icf490345e0d7fbc852ab7a665ca60d578fd3e9c4 --- .../nordix-onap-jenkins-build-server/configure-image.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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" -- 2.25.1