-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I71e9d9ee8bef4a2a0c35889cdae902b23c19a87a Signed-off-by: Sandu Postaru <sandu.postaru@thalesgroup.com>
- Loading branch information
1 parent
4e11304
commit 2cea678
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
def downloadWindowsJDK(jdkWinFolder) { | ||
def jdk = 'jdk-14.0.2' | ||
|
||
def jdkWinURL = 'https://download.java.net/java/GA/jdk14.0.2/205943a0976c4ed48cb16f1043c5c647/12/GPL/openjdk-14.0.2_windows-x64_bin.zip' | ||
def jdkWinZip = 'jdkWin.zip' | ||
|
||
sh "curl -k -o ${jdkWinZip} ${jdkWinURL}" | ||
sh "unzip ${jdkWinZip} -d ${jdkWinFolder}" | ||
sh "mv ${jdkWinFolder}/${jdk} ${jdkWinFolder}/jre" | ||
|
||
println "Windows JDK dowloaded to ${jdkWinFolder}/jre" | ||
sh "ls ${jdkWinFolder}/jre" | ||
} | ||
|
||
def downloadLinuxJDK(jdkLinuxFolder) { | ||
def jdk = 'jdk-14.0.2' | ||
|
||
def jdkLinuxURL = 'https://download.java.net/java/GA/jdk14.0.2/205943a0976c4ed48cb16f1043c5c647/12/GPL/openjdk-14.0.2_linux-x64_bin.tar.gz' | ||
def jdkLinuxTar = 'jdkLinux.tar.gz' | ||
|
||
sh "curl -k -o ${jdkLinuxTar} ${jdkLinuxURL}" | ||
sh "mkdir ${jdkLinuxFolder}" | ||
sh "tar xzvf ${jdkLinuxTar} -C ${jdkLinuxFolder}" | ||
sh "mv ${jdkLinuxFolder}/${jdk} ${jdkLinuxFolder}/jre" | ||
|
||
println "Linux JDK downloaded to ${jdkLinuxFolder}/jre" | ||
sh "ls ${jdkLinuxFolder}/jre" | ||
} | ||
|
||
def downloadMacJDK(jdkMacFolder) { | ||
def jdk = 'jdk-14.0.2' | ||
|
||
def jdkMacURL = 'https://download.java.net/java/GA/jdk14.0.2/205943a0976c4ed48cb16f1043c5c647/12/GPL/openjdk-14.0.2_osx-x64_bin.tar.gz' | ||
def jdkMacTar = 'jdkMac.tar.gz' | ||
|
||
sh "curl -k -o ${jdkMacTar} ${jdkMacURL}" | ||
sh "mkdir ${jdkMacFolder}" | ||
sh "tar xzvf ${jdkMacTar} -C ${jdkMacFolder}" | ||
sh "mv ${jdkMacFolder}/${jdk}.jdk ${jdkMacFolder}/jre" | ||
|
||
println "Mac JDK downloaded to ${jdkMacFolder}/jre" | ||
sh "ls ${jdkMacFolder}/jre" | ||
} |