Skip to content

Commit

Permalink
Add capability to get aarch64 JDK for macOS and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mPorhel authored and pdulth committed Mar 29, 2023
1 parent 8b610b1 commit fa5439f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions vars/downloader.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,18 @@ def fetchTemurinJRE17(name, os) {
jreURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/mac/x64/jre/hotspot/normal/eclipse'
jreArchive = name + '-' + os + '.tar.gz'
break;
case 'mac-aarch64':
jreURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/mac/aarch64/jre/hotspot/normal/eclipse'
jreArchive = name + '-' + os + '.tar.gz'
break;
case 'linux':
jreURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/linux/x64/jre/hotspot/normal/eclipse'
jreArchive = name + '-' + os + '.tar.gz'
break;
case 'linux-aarch64':
jreURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/linux/aarch64/jre/hotspot/normal/eclipse'
jreArchive = name + '-' + os + '.tar.gz'
break;
default:
return;
}
Expand All @@ -81,10 +89,18 @@ def fetchTemurinJDK17(name, os) {
jdkURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/mac/x64/jdk/hotspot/normal/eclipse?project=jdk'
jdkArchive = name + '-' + os + '.tar.gz'
break;
case 'mac-aarch64':
jdkURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/mac/aarch64/jdk/hotspot/normal/eclipse?project=jdk'
jdkArchive = name + '-' + os + '.tar.gz'
break;
case 'linux':
jdkURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/linux/x64/jdk/hotspot/normal/eclipse?project=jdk'
jdkArchive = name + '-' + os + '.tar.gz'
break;
case 'linux-aarch64':
jdkURL = 'https://api.adoptium.net/v3/binary/latest/17/ga/linux/aarch64/jdk/hotspot/normal/eclipse?project=jdk'
jdkArchive = name + '-' + os + '.tar.gz'
break;
default:
return;
}
Expand Down Expand Up @@ -113,10 +129,18 @@ def downloadTemurinJDK17(jdkFolder, os) {
jdkURL = 'https://ci.eclipse.org/capella/job/prefetch-java/lastSuccessfulBuild/artifact/jdk17-mac.tar.gz'
jdkArchive = 'jdk17-mac.tar.gz'
break;
case 'mac-aarch64':
jdkURL = 'https://ci.eclipse.org/capella/job/prefetch-java/lastSuccessfulBuild/artifact/jdk17-mac-aarch64.tar.gz'
jdkArchive = 'jdk17-mac-aarch64.tar.gz'
break;
case 'linux':
jdkURL = 'https://ci.eclipse.org/capella/job/prefetch-java/lastSuccessfulBuild/artifact/jdk17-linux.tar.gz'
jdkArchive = 'jdk17-linux.tar.gz'
break;
case 'linux-aarch64':
jdkURL = 'https://ci.eclipse.org/capella/job/prefetch-java/lastSuccessfulBuild/artifact/jdk17-linux-aarch64.tar.gz'
jdkArchive = 'jdk17-linux-aarch64.tar.gz'
break;
default:
return;
}
Expand All @@ -132,10 +156,18 @@ def downloadTemurinJDK17(jdkFolder, os) {
sh "mkdir ${jdkFolder}"
sh "tar xzf ${jdkArchive} -C ${jdkFolder}"
break;
case 'mac-aarch64':
sh "mkdir ${jdkFolder}"
sh "tar xzf ${jdkArchive} -C ${jdkFolder}"
break;
case 'linux':
sh "mkdir ${jdkFolder}"
sh "tar xzf ${jdkArchive} -C ${jdkFolder}"
break;
case 'linux-aarch64':
sh "mkdir ${jdkFolder}"
sh "tar xzf ${jdkArchive} -C ${jdkFolder}"
break;
default:
break;
}
Expand Down

0 comments on commit fa5439f

Please sign in to comment.