Skip to content

Commit

Permalink
(CAT-2051): Support for aarch64 and arm64 was added for Adopt and…
Browse files Browse the repository at this point in the history
… Adoptium Java installations.
  • Loading branch information
span786 committed Oct 1, 2024
1 parent 6319799 commit 6a0d457
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
secrets: "inherit"
with:
runs_on: "ubuntu-20.04"
flags: "--exclude-platforms '[\"Ubuntu-22.04-arm\", \"RedHat-9-arm\"]'"
flags: "--exclude-platforms '[\"Ubuntu-22.04-arm\", \"RedHat-9-arm\", \"Debian-12-arm\"]'"
6 changes: 3 additions & 3 deletions manifests/adopt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
if ( $_version_int == 8 ) {
$_release_minor_package_name = $release_minor
} else {
$_release_minor_package_name = "_${release_minor}"
$_release_minor_package_name = "_${release_minor.split(/\./)[0]}"
}

case $_package_type {
Expand Down Expand Up @@ -251,8 +251,6 @@
$destination = "${destination_dir}${package_name}"
notice ("Destination is ${destination}")

$install_command = ['tar', '-zxf', $destination, '-C', $_basedir]

case $ensure {
'present' : {
archive { $destination :
Expand Down Expand Up @@ -288,6 +286,8 @@
}
}

$install_command = ['tar', '-zxf', $destination, '-C', $_basedir]

exec { "Install AdoptOpenJDK java ${java} ${_version} ${release_major} ${release_minor}" :
path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
command => $install_command,
Expand Down
45 changes: 26 additions & 19 deletions spec/acceptance/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,21 @@
# We need to test version 8 and >8 (here we use 9), because namings are different after version 8

adopt_enabled = true unless os[:family].casecmp('SLES').zero?
adopt_version8_major = '8'
adopt_version8_minor = '202'
adopt_version8_build = '08'
adopt_version9_major = '9'
adopt_version9_full = '9.0.4'
adopt_version9_build = '11'
case os[:arch]
when 'aarch64', 'arm64'
adopt_version9_full = '9'
adopt_version9_build = '181'
else
adopt_version9_full = '9.0.4'
adopt_version9_build = '11'
end

adopt_version10_major = '10'
adopt_version10_full = '10.0.2'
adopt_version10_build = '13.1'

install_adopt_jdk_jre = <<MANIFEST
java::adopt {
'test_adopt_jre_version8':
version => '#{adopt_version8_major}',
version_major => '#{adopt_version8_major}u#{adopt_version8_minor}',
version_minor => 'b#{adopt_version8_build}',
java => 'jre',
}
java::adopt {
'test_adopt_jdk_version8':
version => '#{adopt_version8_major}',
version_major => '#{adopt_version8_major}u#{adopt_version8_minor}',
version_minor => 'b#{adopt_version8_build}',
java => 'jdk',
}
java::adopt {
'test_adopt_jre_version9':
version => '#{adopt_version9_major}',
Expand All @@ -138,6 +131,20 @@
version_minor => '#{adopt_version9_build}',
java => 'jdk',
}
java::adopt {
'test_adopt_jre_version10':
version => '#{adopt_version10_major}',
version_major => '#{adopt_version10_full}',
version_minor => '#{adopt_version10_build}',
java => 'jre',
}
java::adopt {
'test_adopt_jdk_version10':
version => '#{adopt_version10_major}',
version_major => '#{adopt_version10_full}',
version_minor => '#{adopt_version10_build}',
java => 'jdk',
}
MANIFEST

# Adoptium
Expand Down

0 comments on commit 6a0d457

Please sign in to comment.