From 1e8cd4bf377fd5ac0907ff7247e2b92424ef7f0e Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Tue, 3 Dec 2024 16:07:55 +0000 Subject: [PATCH] Remove AdoptOpenJDK Signed-off-by: Dan Webb --- .github/workflows/ci.yml | 16 +-- CHANGELOG.md | 1 + .../resources/adoptopenjdk_install.md | 58 ---------- .../resources/adoptopenjdk_macos_install.md | 65 ----------- kitchen.yml | 107 +++--------------- libraries/adopt_openjdk_macos_helpers.rb | 19 ---- resources/adoptopenjdk_install.rb | 67 ----------- resources/adoptopenjdk_macos_install.rb | 71 ------------ .../cookbooks/test/recipes/adoptopenjdk.rb | 5 - .../recipes/remove-adoptopenjdk-11-openj9.rb | 8 -- .../controls/verify_adoptopenjdk.rb | 78 ------------- .../inputs/adoptopenjdk-11-hotspot.yml | 4 - .../adoptopenjdk-11-openj9-large-heap.yml | 4 - .../inputs/adoptopenjdk-11-openj9.yml | 4 - .../inputs/adoptopenjdk-14-hotspot.yml | 4 - .../inputs/adoptopenjdk-14-macos.yml | 4 - .../adoptopenjdk-14-openj9-large-heap.yml | 4 - .../inputs/adoptopenjdk-14-openj9.yml | 4 - .../inputs/adoptopenjdk-8-hotspot.yml | 4 - .../adoptopenjdk-8-openj9-large-heap.yml | 4 - .../inputs/adoptopenjdk-8-openj9.yml | 4 - test/integration/adoptopenjdk/inspec.yml | 7 -- .../controls/verify_adoptopenjdk-removal.rb | 35 ------ .../remove-adoptopenjdk/inspec.yml | 7 -- 24 files changed, 25 insertions(+), 559 deletions(-) delete mode 100644 documentation/resources/adoptopenjdk_install.md delete mode 100644 documentation/resources/adoptopenjdk_macos_install.md delete mode 100644 libraries/adopt_openjdk_macos_helpers.rb delete mode 100644 resources/adoptopenjdk_install.rb delete mode 100644 resources/adoptopenjdk_macos_install.rb delete mode 100644 test/fixtures/cookbooks/test/recipes/adoptopenjdk.rb delete mode 100644 test/fixtures/cookbooks/test/recipes/remove-adoptopenjdk-11-openj9.rb delete mode 100644 test/integration/adoptopenjdk/controls/verify_adoptopenjdk.rb delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-11-hotspot.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9-large-heap.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-14-hotspot.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-14-macos.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9-large-heap.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-8-hotspot.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9-large-heap.yml delete mode 100644 test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9.yml delete mode 100644 test/integration/adoptopenjdk/inspec.yml delete mode 100644 test/integration/remove-adoptopenjdk/controls/verify_adoptopenjdk-removal.rb delete mode 100644 test/integration/remove-adoptopenjdk/inspec.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2111d9c0..ab4824eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,14 +34,10 @@ jobs: - openjdk-11 - openjdk-16 - openjdk-17 - - adoptopenjdk-8-openj9 - - adoptopenjdk-11-hotspot - - adoptopenjdk-11-openj9 - - adoptopenjdk-11-openj9-large-heap - - adoptopenjdk-14-hotspot - - adoptopenjdk-14-openj9 - - adoptopenjdk-14-openj9-large-heap - - adoptopenjdk-removal-11-openj9 + - temurin-8-hotspot + - temurin-11-hotspot + - semeru-11-openj9 + - semeru-17-openj9 - corretto-8 - corretto-11 - corretto-17 @@ -80,7 +76,7 @@ jobs: KITCHEN_LOCAL_YAML: kitchen.macos.yml TERM: xterm-256color with: - suite: adoptopenjdk-14 + suite: temurin-11 os: macos action: converge - name: Source Profile for JAVA_HOME @@ -97,7 +93,7 @@ jobs: KITCHEN_LOCAL_YAML: kitchen.macos.yml TERM: xterm-256color with: - suite: adoptopenjdk-14 + suite: temurin-11 os: macos action: verify diff --git a/CHANGELOG.md b/CHANGELOG.md index b90c4aad..ef8067e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This file is used to list changes made in each version of the Java cookbook. - CI: chore(deps): update sous-chefs/.github action to v3.1.0 - CI: chore(deps): update actionshub/chef-install action to v3 - Update platforms +- Replace AdoptOpenJDK with Eclipse Temurin and IBM Semeru ## 12.0.7 - *2024-11-18* diff --git a/documentation/resources/adoptopenjdk_install.md b/documentation/resources/adoptopenjdk_install.md deleted file mode 100644 index 6edee611..00000000 --- a/documentation/resources/adoptopenjdk_install.md +++ /dev/null @@ -1,58 +0,0 @@ -# adoptopenjdk_install - -[back to resource list](https://github.com/sous-chefs/java#resources) - -Introduced: v7.0.0 - -## Actions - -- `:install` -- `:remove` - -## Properties - -| Name | Type | Default | Description | -| --------------------- | ----------------- | ------- | -------------------------------------------------------------- | -| version | String | | Java version to install | -| variant | String | | Install flavour', default: 'openj9 | -| url | String | | The URL to download from | -| checksum | String | | The checksum for the downloaded file | -| java_home | String | | Set to override the java_home | -| java_home_mode | String | | The permission for the Java home directory | -| java_home_owner | String | | Owner of the Java Home | -| java_home_group | String | | Group for the Java Home | -| default | [true, false] | | Whether to set this as the defalut Java | -| bin_cmds | Array | | A list of bin_cmds based on the version and variant | -| alternatives_priority | Integer | | Alternatives priority to set for this Java | -| reset_alternatives | [true, false] | | Whether to reset alternatives before setting | -| tap_url | String, | | The URL of the tap | -| cask_options | String, | | Options to pass to the brew command during installation | -| homebrew_path | String, | | The path to the homebrew binary | -| owner | [String, Integer] | | The owner of the Homebrew installation | - -## Examples - -To install Hotspot AdoptOpenJDK 11 and set it as the default Java: - -```ruby -adoptopenjdk_install '11' -``` - -To install hotspot AdoptOpenJDK 11 and set it as second highest priority: - -```ruby -adoptopenjdk_install '10' do - variant 'hotspot' - alternatives_priority 2 -end -``` - -To install AdoptOpenJDK 11 from a custom tarball: - -```ruby -adoptopenjdk_install '11' do - variant 'hotspot' - url 'http://url.of/path/to/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz' - checksum 'asdfasdfasdf' -end -``` diff --git a/documentation/resources/adoptopenjdk_macos_install.md b/documentation/resources/adoptopenjdk_macos_install.md deleted file mode 100644 index 62ac0e5e..00000000 --- a/documentation/resources/adoptopenjdk_macos_install.md +++ /dev/null @@ -1,65 +0,0 @@ - -# adoptopenjdk_macos_install - -[back to resource list](https://github.com/sous-chefs/java#resources) - -Introduced: v8.1.0 - -## Actions - -- `:install` -- `:remove` - -## Properties - -| Name | Type | Default | Description | Allowed Values | -| ------------- | ----------------- | -------------------------- | -------------------------------------------------------------- | -------------- | -| tap_url | String | | The URL of the tap | | -| cask_options | String | | Options to pass to the brew command during installation | | -| homebrew_path | String | | The path to the homebrew binary | | -| owner | [String, Integer] | | The owner of the Homebrew installation | | -| java_home | String | `macos_java_home(version)` | MacOS specific JAVA_HOME | | -| version | String | `adoptopenjdk14` | | See list below | - -## Allowed Install Versions - -- adoptopenjdk8 -- adoptopenjdk8-openj9 -- adoptopenjdk8-openj9-large -- adoptopenjdk8-jre -- adoptopenjdk8-openj9-jre -- adoptopenjdk8-jre-large -- adoptopenjdk9 -- adoptopenjdk10 -- adoptopenjdk11 -- adoptopenjdk11-openj9 -- adoptopenjdk11-openj9-large -- adoptopenjdk11-jre -- adoptopenjdk11-openj9-jre -- adoptopenjdk11-openj9-jre-large -- adoptopenjdk12 -- adoptopenjdk12-openj9 -- adoptopenjdk12-openj9-large -- adoptopenjdk12-jre -- adoptopenjdk12-openj9-jre -- adoptopenjdk12-openj9-jre-large -- adoptopenjdk13 -- adoptopenjdk13-openj9 -- adoptopenjdk13-openj9-large -- adoptopenjdk13-jre -- adoptopenjdk13-openj9-jre -- adoptopenjdk13-openj9-jre-large -- adoptopenjdk14 -- adoptopenjdk14-openj9 -- adoptopenjdk14-openj9-large -- adoptopenjdk14-jre -- adoptopenjdk14-openj9-jre -- adoptopenjdk14-openj9-jre-large - -## Examples - -To install Hotspot AdoptOpenJDK 11 and set it as the default Java: - -```ruby -adoptopenjdk_macos_install 'adoptopenjdk14-jre' -``` diff --git a/kitchen.yml b/kitchen.yml index 1b00b25f..2126c0c9 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -47,117 +47,46 @@ suites: inspec_tests: [test/integration/openjdk] inputs: { java_version: "17" } - # AdoptOpenJDK - # Version 8 - - name: adoptopenjdk-8-hotspot + # Temurin/Semeru + - name: temurin-8-hotspot run_list: - - recipe[test::adoptopenjdk] + - recipe[test::openjdk] attributes: version: 8 variant: hotspot verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-8-hotspot.yml - - - name: adoptopenjdk-8-openj9 - run_list: - - recipe[test::adoptopenjdk] - attributes: - version: 8 - variant: openj9 - verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9.yml - - - name: adoptopenjdk-8-openj9-large-heap - run_list: - - recipe[test::adoptopenjdk] - attributes: - version: 8 - variant: openj9-large-heap - verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9-large-heap.yml + inspec_tests: [test/integration/openjdk] + inputs: { java_version: "8" } - # Version 11 - - name: adoptopenjdk-11-hotspot + - name: temurin-11-hotspot run_list: - - recipe[test::adoptopenjdk] + - recipe[test::openjdk] attributes: version: 11 variant: hotspot verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-11-hotspot.yml - - name: adoptopenjdk-11-openj9 + inspec_tests: [test/integration/openjdk] + inputs: { java_version: "11" } + + - name: semeru-11-openj9 run_list: - - recipe[test::adoptopenjdk] + - recipe[test::openjdk] attributes: version: 11 variant: openj9 verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml - - name: adoptopenjdk-11-openj9-large-heap - run_list: - - recipe[test::adoptopenjdk] - attributes: - version: 11 - variant: openj9-large-heap - verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9-large-heap.yml - - # Version 17 - - name: adoptopenjdk-17-openj9-large-heap - run_list: - - recipe[test::adoptopenjdk] - attributes: - version: 17 - variant: openj9-large-heap - verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-17-openj9-large-heap.yml + inspec_tests: [test/integration/openjdk] + inputs: { java_version: "11" } - - name: adoptopenjdk-17-openj9 - run_list: - - recipe[test::adoptopenjdk] - attributes: - version: 17 - variant: openj9 - verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-17-openj9.yml - - name: adoptopenjdk-17-hotspot + - name: semeru-17-openj9 run_list: - - recipe[test::adoptopenjdk] + - recipe[test::openjdk] attributes: version: 17 - variant: hotspot - verifier: - inspec_tests: [test/integration/adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-14-hotspot.yml - - # 11 Removal - - name: adoptopenjdk-removal-11-openj9 - run_list: - - recipe[test::remove-adoptopenjdk-11-openj9] - attributes: - version: 11 variant: openj9 verifier: - inspec_tests: [test/integration/remove-adoptopenjdk] - input_files: - - test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml + inspec_tests: [test/integration/openjdk] + inputs: { java_version: "17" } # Corretto - name: corretto-8 diff --git a/libraries/adopt_openjdk_macos_helpers.rb b/libraries/adopt_openjdk_macos_helpers.rb deleted file mode 100644 index 3680c9ce..00000000 --- a/libraries/adopt_openjdk_macos_helpers.rb +++ /dev/null @@ -1,19 +0,0 @@ -module Java - module Cookbook - module AdoptOpenJdkMacOsHelpers - def macos_java_home(version) - if version.include? 'jre' - ending = '.jre' - version.gsub!('-jre', '') - else - ending = '.jdk' - end - - version.gsub!('jdk', 'jdk-') - version.slice!('-large') - - "/Library/Java/JavaVirtualMachines/#{version}#{ending}/Contents/Home" - end - end - end -end diff --git a/resources/adoptopenjdk_install.rb b/resources/adoptopenjdk_install.rb deleted file mode 100644 index 3cfe4d25..00000000 --- a/resources/adoptopenjdk_install.rb +++ /dev/null @@ -1,67 +0,0 @@ -provides :adoptopenjdk_install -unified_mode true - -property :variant, - String, - description: 'Install flavour', default: 'openj9' - -property :url, - String, - description: 'The URL to download from' - -property :checksum, - String, - description: 'The checksum for the downloaded file' - -property :java_home, - String, - description: 'Set to override the java_home' - -property :bin_cmds, - Array, - description: 'A list of bin_cmds based on the version and variant' - -use 'partial/_common' -use 'partial/_linux' -use 'partial/_java_home' -use 'partial/_macos' - -action :install do - case node['platform_family'] - when 'mac_os_x' - variant = if new_resource.variant.include? 'openj9' - '' - else - "-#{new_resource.variant}" - end - - adoptopenjdk_macos_install 'homebrew' do - tap_url new_resource.tap_url - cask_options new_resource.cask_options - homebrew_path new_resource.homebrew_path - owner new_resource.owner - version "adoptopenjdk#{new_resource.version}#{variant}" - end - when 'windows' - log 'not yet implemented' - else - log 'not yet implemented' - end -end - -action :remove do - case node['platform_family'] - when 'mac_os_x' - adoptopenjdk_macos_install 'homebrew' do - tap_url new_resource.tap_url - cask_options new_resource.cask_options - homebrew_path new_resource.homebrew_path - owner new_resource.owner - action :remove - end - when 'windows' - log 'not yet implemented' - else - log 'not yet implemented' - end -end diff --git a/resources/adoptopenjdk_macos_install.rb b/resources/adoptopenjdk_macos_install.rb deleted file mode 100644 index 92fd6c7e..00000000 --- a/resources/adoptopenjdk_macos_install.rb +++ /dev/null @@ -1,71 +0,0 @@ -provides :adoptopenjdk_macos_install -unified_mode true -include Java::Cookbook::AdoptOpenJdkMacOsHelpers - -use 'partial/_macos' - -property :java_home, String, - default: lazy { macos_java_home(version) }, - description: 'MacOS specific JAVA_HOME' - -property :version, String, - default: 'adoptopenjdk14', - equal_to: %w( - adoptopenjdk8 adoptopenjdk8-openj9 adoptopenjdk8-openj9-large - adoptopenjdk8-jre adoptopenjdk8-openj9-jre adoptopenjdk8-jre-large - adoptopenjdk9 adoptopenjdk10 - adoptopenjdk11 adoptopenjdk11-openj9 adoptopenjdk11-openj9-large - adoptopenjdk11-jre adoptopenjdk11-openj9-jre adoptopenjdk11-openj9-jre-large - adoptopenjdk12 adoptopenjdk12-openj9 adoptopenjdk12-openj9-large - adoptopenjdk12-jre adoptopenjdk12-openj9-jre adoptopenjdk12-openj9-jre-large - adoptopenjdk13 adoptopenjdk13-openj9 adoptopenjdk13-openj9-large - adoptopenjdk13-jre adoptopenjdk13-openj9-jre adoptopenjdk13-openj9-jre-large - adoptopenjdk14 adoptopenjdk14-openj9 adoptopenjdk14-openj9-large - adoptopenjdk14-jre adoptopenjdk14-openj9-jre adoptopenjdk14-openj9-jre-large - ) - -action :install do - homebrew_tap 'AdoptOpenJDK/openjdk' do - homebrew_path new_resource.homebrew_path - owner new_resource.owner - url new_resource.tap_url - action :tap - end - - homebrew_cask "AdoptOpenJDK/openjdk/#{new_resource.version}" do - homebrew_path new_resource.homebrew_path - install_cask true - options new_resource.cask_options - owner new_resource.owner - action :install - end - - # Bash system wide environment variables - append_if_no_line 'Java Home' do - path '/etc/profile' - line "export JAVA_HOME=#{new_resource.java_home}" - end - - # Zsh system wide environment variables - append_if_no_line 'Java Home' do - path '/etc/zshrc' - line "export JAVA_HOME=#{new_resource.java_home}" - end - - node.default['java']['java_home'] = new_resource.java_home -end - -action :remove do - homebrew_tap 'AdoptOpenJDK/openjdk' do - homebrew_path new_resource.homebrew_path - owner new_resource.owner - action :untap - end - - homebrew_cask "adoptopenjdk#{new_resource.version}" do - homebrew_path new_resource.homebrew_path - options new_resource.cask_options - owner new_resource.owner - action :remove - end -end diff --git a/test/fixtures/cookbooks/test/recipes/adoptopenjdk.rb b/test/fixtures/cookbooks/test/recipes/adoptopenjdk.rb deleted file mode 100644 index 79047bf1..00000000 --- a/test/fixtures/cookbooks/test/recipes/adoptopenjdk.rb +++ /dev/null @@ -1,5 +0,0 @@ -adoptopenjdk_install node['version'] do - variant node['variant'] if node['variant'] -end - -include_recipe 'test::java_cert' diff --git a/test/fixtures/cookbooks/test/recipes/remove-adoptopenjdk-11-openj9.rb b/test/fixtures/cookbooks/test/recipes/remove-adoptopenjdk-11-openj9.rb deleted file mode 100644 index 02857f5b..00000000 --- a/test/fixtures/cookbooks/test/recipes/remove-adoptopenjdk-11-openj9.rb +++ /dev/null @@ -1,8 +0,0 @@ -apt_update - -include_recipe 'test::adoptopenjdk' - -adoptopenjdk_install '11' do - variant 'openj9' - action :remove -end diff --git a/test/integration/adoptopenjdk/controls/verify_adoptopenjdk.rb b/test/integration/adoptopenjdk/controls/verify_adoptopenjdk.rb deleted file mode 100644 index 2ae80294..00000000 --- a/test/integration/adoptopenjdk/controls/verify_adoptopenjdk.rb +++ /dev/null @@ -1,78 +0,0 @@ -variant = input('variant', description: 'Variant being used: openj9, openj9-large-heap, or hotspot') -java_version = input('java_version', description: 'Which version of java should be installed') -certificate_sha256_checksum = input('certificate_sha256_checksum', - value: '64:F3:3B:A7:EF:C3:5C:6B:2D:ED:95:0B:CB:4E:96:3B:12:97:B8:62:BA:1A:8E:30:13:B0:B0:59:77:12:31:EA', - description: 'The SHA256 checksum of the certificate' -) -parent_install_dir = input('parent_install_dir', - value: "java-#{java_version.to_i > 8 ? java_version.to_i : java_version.split('.')[1]}-adoptopenjdk-#{variant}", - description: 'The parent of the Java home') -keystore_location = input('keystore_location', - value: nil, - description: 'Where the java keystore is located' -) -keystore_password = input('keystore_password', - value: 'changeit', - description: 'Password to the Java keystore') - -control 'check-java-version' do - impact 1.0 - title 'Verify java version' - desc 'Verify the correct version of java is installed' - - describe command('java -version 2>&1') do - its('stdout') { should match /AdoptOpenJDK/ } unless java_version.to_i == 1 - its('stdout') { should match Regexp.new(java_version.to_s) } - end -end - -if os.linux? - control 'check-java-alternatives' do - impact 1.0 - title 'Verify alternatives for java' - desc 'Verify alternatives for java are set to the correct version' - - %w(jar jarsigner java javac).each do |cmd| - describe command("update-alternatives --display #{cmd}") do - its('stdout') { should match parent_install_dir.to_s } - end - end - end -end - -control 'check-jce' do - impact 1.0 - title 'Verify JCE is Unlimitied' - desc 'Verify JCE unlimited support and string' - - describe command('java -jar /tmp/UnlimitedSupportJCETest.jar') do - its('stdout') { should match /isUnlimitedSupported=TRUE/ } - its('stdout') { should match /strength: 2147483647/ } - end -end - -control 'check-certificate' do - impact 1.0 - title 'Verify Java keystore contains the certificate' - desc 'Verify Java keystore exists and contains the certificate' - - unless certificate_sha256_checksum.nil? || certificate_sha256_checksum.empty? - cmd = "keytool -list -v -keystore #{keystore_location}" - cmd.concat(" -storepass #{keystore_password}") unless keystore_password.nil? - describe command("#{cmd} | grep SHA256:") do - its('stdout') { should match certificate_sha256_checksum } - end - end -end - -if os.darwin? - control 'JAVA_HOME' do - impact 0.1 - title 'Verify the JAVA_HOME is set correctly' - desc 'Verify that JAVA_HOME is set correctly and to the correct version in the bash profile' - - describe file('/etc/profile') do - its('content') { should match /JAVA_HOME/ } - end - end -end diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-hotspot.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-hotspot.yml deleted file mode 100644 index aca4299e..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-hotspot.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 11.0.6 -variant: "hotspot" -keystore_location: '/usr/lib/jvm/java-11-adoptopenjdk-hotspot/jdk-11.0.6+10/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9-large-heap.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9-large-heap.yml deleted file mode 100644 index ceb92c0b..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9-large-heap.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 11.0.6 -variant: "openj9-large-heap" -keystore_location: '/usr/lib/jvm/java-11-adoptopenjdk-openj9-large-heap/jdk-11.0.6+10/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml deleted file mode 100644 index 51f0e887..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-11-openj9.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 11.0.6 -variant: "openj9" -keystore_location: '/usr/lib/jvm/java-11-adoptopenjdk-openj9/jdk-11.0.6+10/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-hotspot.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-hotspot.yml deleted file mode 100644 index 7be7f985..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-hotspot.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 14 -variant: "hotspot" -keystore_location: '/usr/lib/jvm/java-14-adoptopenjdk-hotspot/jdk-14+36/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-macos.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-macos.yml deleted file mode 100644 index 315dca34..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-macos.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: '14' -variant: "openj9" -keystore_location: '/Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9-large-heap.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9-large-heap.yml deleted file mode 100644 index 3cc4019b..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9-large-heap.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 14 -variant: "openj9-large-heap" -keystore_location: '/usr/lib/jvm/java-14-adoptopenjdk-openj9-large-heap/jdk-14+36/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9.yml deleted file mode 100644 index 06f74fe2..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-14-openj9.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 14 -variant: "openj9" -keystore_location: '/usr/lib/jvm/java-14-adoptopenjdk-openj9/jdk-14+36/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-hotspot.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-hotspot.yml deleted file mode 100644 index ed5cfa28..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-hotspot.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 1.8.0 -variant: "hotspot" -keystore_location: '/usr/lib/jvm/java-8-adoptopenjdk-hotspot/jdk8u242-b08/jre/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9-large-heap.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9-large-heap.yml deleted file mode 100644 index e6ebc7c7..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9-large-heap.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 1.8.0 -variant: "openj9-large-heap" -keystore_location: '/usr/lib/jvm/java-8-adoptopenjdk-openj9-large-heap/jdk8u242-b08/jre/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9.yml b/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9.yml deleted file mode 100644 index f7c4ccf6..00000000 --- a/test/integration/adoptopenjdk/inputs/adoptopenjdk-8-openj9.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -java_version: 1.8.0 -variant: "openj9" -keystore_location: '/usr/lib/jvm/java-8-adoptopenjdk-openj9/jdk8u242-b08/jre/lib/security/cacerts' diff --git a/test/integration/adoptopenjdk/inspec.yml b/test/integration/adoptopenjdk/inspec.yml deleted file mode 100644 index 69dff34a..00000000 --- a/test/integration/adoptopenjdk/inspec.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: adoptopenjdk -title: AdoptOpenJDK tests -license: Public domain -copyright: None -summary: Verify installation of AdoptOpenJDK -version: 0.0.1 diff --git a/test/integration/remove-adoptopenjdk/controls/verify_adoptopenjdk-removal.rb b/test/integration/remove-adoptopenjdk/controls/verify_adoptopenjdk-removal.rb deleted file mode 100644 index 73ec00a7..00000000 --- a/test/integration/remove-adoptopenjdk/controls/verify_adoptopenjdk-removal.rb +++ /dev/null @@ -1,35 +0,0 @@ -variant = input('variant', value: 'openj9', description: 'Variant being used: openj9, openj9-large-heap, or hotspot') -alternative_bin_cmds = input('alternative_bin_cmds', - value: %w(jar java keytool), - description: 'List of bin commands that should be included in alternatives') -java_version = input('java_version', - value: '1.8.0', - description: 'Which version of java should be installed') -java_home = input('java_home', - value: "/usr/lib/jvm/java-#{java_version.to_i > 8 ? java_version.to_i : java_version.split('.')[1]}-adoptopenjdk-#{variant}", - description: 'Path to the Java home directory') - -control 'check-removal-java-directory' do - impact 1.0 - title 'Verify java directory has been removed' - desc 'Verify java directory has been removed' - - describe directory(java_home) do - it { should_not exist } - end -end - -control 'check-java-alternatives-removal' do - impact 1.0 - title 'Verify alternatives for java are removed' - desc 'Verify alternatives for java are removed' - - # NOTE: platform_family?('rhel') is not working for amazon-linux - if os.family == 'redhat' - alternative_bin_cmds.each do |cmd| - describe command("update-alternatives --display #{cmd}") do - its('stdout') { should_not match "#{java_home}/bin/#{cmd}" } - end - end - end -end diff --git a/test/integration/remove-adoptopenjdk/inspec.yml b/test/integration/remove-adoptopenjdk/inspec.yml deleted file mode 100644 index 22d8d373..00000000 --- a/test/integration/remove-adoptopenjdk/inspec.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: remove-adoptopenjdk -title: AdoptOpenJDK removal tests -license: Public domain -copyright: None -summary: Verify removal of AdoptOpenJDK -version: 0.0.1