Provisioning: Upgrade Java JDK to version 11

Task-number: QTQAINFRA-4596
Change-Id: I5c67f220b5a1f3115032eb509d1d391cf1e520a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit abd2e0b381)
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
This commit is contained in:
Heikki Halmet
2021-10-07 14:36:00 +03:00
parent deaf7dddca
commit e3a457f60d
3 changed files with 15 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
#############################################################################
##
## Copyright (C) 2017 The Qt Company Ltd.
## Copyright (C) 2021 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
@@ -38,11 +38,11 @@
set -ex
echo "Installing Java Development Kit"
targetFile=jdk-8u102-macosx-x64.dmg
version=11.0.12
targetFile=jdk-${version}_osx-x64_bin.dmg
url=ci-files01-hki.intra.qt.io:/hdd/www/input/mac
# url_alt=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-macosx-x64.dmg
# url_alt=https://www.oracle.com/java/technologies/downloads/#java11-linux
echo "Mounting $targetFile"
sudo mkdir -p /Volumes/files
@@ -53,12 +53,12 @@ sudo umount /Volumes/files
sudo hdiutil attach "/tmp/$targetFile"
echo Installing JDK
cd /Volumes/JDK\ 8\ Update\ 102/ && sudo installer -package JDK\ 8\ Update\ 102.pkg -target /
cd /Volumes/JDK\ ${version} && sudo installer -package JDK\ ${version}.pkg -target /
echo "Unmounting $targetFile"
sudo hdiutil unmount /Volumes/JDK\ 8\ Update\ 102/ -force
sudo hdiutil unmount /Volumes/JDK\ ${version} -force
echo "Disable auto update"
sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false
echo "JDK Version = 8 update 102" >> ~/versions.txt
echo "JDK Version = ${version}" >> ~/versions.txt