Skip to content

Commit

Permalink
AdoptOpenJDK --> Termurin/Semeru
Browse files Browse the repository at this point in the history
# Description

Remove AdoptOpenJDK and replace with Adoptium Termurin & IBM Semeru

## Issues Resolved

#674 

## Check List

- [ ] A summary of changes made is included in the CHANGELOG under `## Unreleased`
- [ ] New functionality includes testing.
- [ ] New functionality has been documented in the README if applicable.
  • Loading branch information
damacus authored Sep 29, 2023
1 parent 9d3e63a commit 00570a6
Show file tree
Hide file tree
Showing 13 changed files with 373 additions and 600 deletions.
275 changes: 140 additions & 135 deletions CHANGELOG.md

Large diffs are not rendered by default.

77 changes: 44 additions & 33 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ platforms:
- name: freebsd-11
- name: freebsd-12
- name: fedora-latest
# - name: opensuse-leap-15
- name: ubuntu-18.04
- name: ubuntu-20.04

Expand All @@ -29,26 +28,26 @@ suites:
- name: openjdk-11
run_list:
- recipe[test::openjdk]
attributes: {version: "11"}
attributes: { version: "11" }
verifier:
inspec_tests: [test/integration/openjdk]
inputs: {java_version: "11"}
inputs: { java_version: "11" }

- name: openjdk-16
run_list:
- recipe[test::openjdk]
attributes: {version: "16"}
attributes: { version: "16" }
verifier:
inspec_tests: [test/integration/openjdk]
inputs: {java_version: "16"}
inputs: { java_version: "16" }

- name: openjdk-17
run_list:
- recipe[test::openjdk]
attributes: {version: "17"}
attributes: { version: "17" }
verifier:
inspec_tests: [test/integration/openjdk]
inputs: {java_version: "17"}
inputs: { java_version: "17" }

# AdoptOpenJDK
# Version 8
Expand All @@ -60,7 +59,8 @@ suites:
variant: hotspot
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-8-hotspot.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-8-hotspot.yml

- name: adoptopenjdk-8-openj9
run_list:
Expand All @@ -70,7 +70,8 @@ suites:
variant: openj9
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9.yml

- name: adoptopenjdk-8-openj9-large-heap
run_list:
Expand All @@ -80,7 +81,8 @@ suites:
variant: openj9-large-heap
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9-large-heap.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9-large-heap.yml

# Version 11
- name: adoptopenjdk-11-hotspot
Expand All @@ -91,7 +93,8 @@ suites:
variant: hotspot
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-11-hotspot.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-11-hotspot.yml
- name: adoptopenjdk-11-openj9
run_list:
- recipe[test::adoptopenjdk]
Expand All @@ -100,7 +103,8 @@ suites:
variant: openj9
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml
- name: adoptopenjdk-11-openj9-large-heap
run_list:
- recipe[test::adoptopenjdk]
Expand All @@ -109,36 +113,41 @@ suites:
variant: openj9-large-heap
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9-large-heap.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9-large-heap.yml

# Version 14
- name: adoptopenjdk-14-openj9-large-heap
# Version 17
- name: adoptopenjdk-17-openj9-large-heap
run_list:
- recipe[test::adoptopenjdk]
attributes:
version: 14
version: 17
variant: openj9-large-heap
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9-large-heap.yml]
- name: adoptopenjdk-14-openj9
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-17-openj9-large-heap.yml

- name: adoptopenjdk-17-openj9
run_list:
- recipe[test::adoptopenjdk]
attributes:
version: 14
version: 17
variant: openj9
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9.yml]
- name: adoptopenjdk-14-hotspot
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-17-openj9.yml
- name: adoptopenjdk-17-hotspot
run_list:
- recipe[test::adoptopenjdk]
attributes:
version: 14
version: 17
variant: hotspot
verifier:
inspec_tests: [test/integration/adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-14-hotspot.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-14-hotspot.yml

# 11 Removal
- name: adoptopenjdk-removal-11-openj9
Expand All @@ -149,37 +158,38 @@ suites:
variant: openj9
verifier:
inspec_tests: [test/integration/remove-adoptopenjdk]
input_files: [test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml]
input_files:
- test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml

# Corretto
- name: corretto-8
run_list:
- recipe[test::corretto]
attributes: {version: "8"}
attributes: { version: "8" }
verifier:
inspec_tests: [test/integration/corretto]
inputs: {java_version: "8"}
inputs: { java_version: "8" }
- name: corretto-11
run_list:
- recipe[test::corretto]
attributes: {version: "11"}
attributes: { version: "11" }
verifier:
inspec_tests: [test/integration/corretto]
inputs: {java_version: "11"}
inputs: { java_version: "11" }
- name: corretto-17
run_list:
- recipe[test::corretto]
attributes: {version: "17"}
attributes: { version: "17" }
verifier:
inspec_tests: [test/integration/corretto]
inputs: {java_version: "17"}
inputs: { java_version: "17" }
- name: corretto-18
run_list:
- recipe[test::corretto]
attributes: {version: "18"}
attributes: { version: "18" }
verifier:
inspec_tests: [test/integration/corretto]
inputs: {java_version: "18"}
inputs: { java_version: "18" }

# Custom URL tests
- name: custom-package-8
Expand Down Expand Up @@ -225,4 +235,5 @@ suites:
checksum: 6524d85d2ce334c955a4347015567326067ef15fe5f6a805714b25cace256f40
verifier:
inspec_tests: [test/integration/custom-package]
input_files: [test/integration/custom-package/inputs/openj9-large-heap-11.yml]
input_files:
[test/integration/custom-package/inputs/openj9-large-heap-11.yml]
102 changes: 0 additions & 102 deletions libraries/adopt_openjdk_helpers.rb

This file was deleted.

57 changes: 53 additions & 4 deletions libraries/openjdk_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ def lts
%w(11 17)
end

# This method relies on the GitHub release artefact URL
# e.g. https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.3%2B7/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.3_7.tar.gz
def sub_dir(url)
URI.parse(url)
url.split('/')[7].split('_')[0].gsub('%2', '-').downcase
end

def default_openjdk_install_method(version)
case node['platform_family']
when 'amazon'
Expand All @@ -27,14 +34,33 @@ def default_openjdk_install_method(version)
end
end

def default_openjdk_url(version)
def default_openjdk_url(version, variant = nil)
# Always default to OpenJDK
# If the user passes variant we'll also select that variant's URL
case version
when '8'
case variant
when 'semeru'
'https://github.com/ibmruntimes/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz'
when 'temurin'
'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'
else
Chef::Log.fatal('Version specified does not have a URL value set')
raise 'Version supplied does not have a download URL set'
end
when '9'
'https://download.java.net/java/GA/jdk9/9/binaries/openjdk-9_linux-x64_bin.tar.gz'
when '10'
'https://download.java.net/java/GA/jdk10/10/binaries/openjdk-10_linux-x64_bin.tar.gz'
when '11'
'https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz'
case variant
when 'semeru'
'https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.14.1%2B1_openj9-0.30.1/ibm-semeru-open-jdk_x64_linux_11.0.14.1_1_openj9-0.30.1.tar.gz'
when 'temurin'
'https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz'
else
'https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz'
end
when '12'
'https://download.java.net/java/GA/jdk12/33/GPL/openjdk-12_linux-x64_bin.tar.gz'
when '13'
Expand All @@ -44,9 +70,32 @@ def default_openjdk_url(version)
when '15'
'https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_linux-x64_bin.tar.gz'
when '16'
'https://download.java.net/java/GA/jdk16/7863447f0ab643c585b9bdebf67c69db/36/GPL/openjdk-16_linux-x64_bin.tar.gz'
case variant
when 'semeru'
'https://github.com/ibmruntimes/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz'
when 'temurin'
'https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz'
else
'https://download.java.net/java/GA/jdk16/7863447f0ab643c585b9bdebf67c69db/36/GPL/openjdk-16_linux-x64_bin.tar.gz'
end
when '17'
'https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_linux-x64_bin.tar.gz'
case variant
when 'semeru'
'https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz'
when 'temurin'
'https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_linux_hotspot_18.0.1_10.tar.gz'
else
'https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_linux-x64_bin.tar.gz'
end
when '18'
case variant
when 'semeru'
'https://github.com/AdoptOpenJDK/semeru18-binaries/releases/download/jdk-18.0.1%2B10_openj9-0.32.0/ibm-semeru-open-jdk_x64_linux_18.0.1_10_openj9-0.32.0.tar.gz'
when 'temurin'
'https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_linux_hotspot_18.0.1_10.tar.gz'
else
'https://download.java.net/java/GA/jdk18.0.1/3f48cabb83014f9fab465e280ccf630b/10/GPL/openjdk-18.0.1_linux-x64_bin.tar.gz'
end
else
Chef::Log.fatal('Version specified does not have a URL value set')
raise 'Version supplied does not have a download URL set'
Expand Down
Loading

0 comments on commit 00570a6

Please sign in to comment.