Skip to content

Commit 14c8ca3

Browse files
committed
(FM-8969) Parameterize arm64 architecture
Curl agent from `arm64` based directory when `uname -p` is arm. Since this is the first macOS 12 ARM released, we install the latest version from puppet6 nightly and skip the 6.x to 6.y test.
1 parent f390208 commit 14c8ca3

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

task_spec/spec/acceptance/init_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def log_output_errors(result)
6262
'6.23.0'
6363
when %r{osx-12-x86_64}
6464
'6.27.1'
65+
when %r{osx-12-arm}
66+
'latest'
6567
when %r{ubuntu-22.04}
6668
'latest'
6769
else
@@ -71,7 +73,7 @@ def log_output_errors(result)
7173
# platforms that only have nightly builds available. Once a platform
7274
# is released, it should be removed from this list.
7375
case target_platform
74-
when %r{ubuntu-22.04}
76+
when %r{ubuntu-22.04}, %r{osx-12-arm}
7577
puppet_6_collection = 'puppet6-nightly'
7678
puppet_7_collection = 'puppet7-nightly'
7779
else
@@ -83,7 +85,7 @@ def log_output_errors(result)
8385
# Once there a platform has been released more than once, it can be removed
8486
# from this list.
8587
multiple_puppet6_versions = case target_platform
86-
when %r{osx-12-x86_64}
88+
when %r{osx-12-x86_64}, %r{osx-12-arm}
8789
false
8890
when %r{ubuntu-22.04}
8991
false

tasks/install_shell.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,12 @@ case $platform in
675675
else
676676
filename="puppet-agent-${version}-1.osx${platform_version}.dmg"
677677
fi
678-
download_url="${mac_source}/mac/${collection}/${platform_version}/x86_64/${filename}"
678+
679+
arch="x86_64"
680+
if [[ $(uname -p) == "arm" ]]; then
681+
arch="arm64"
682+
fi
683+
download_url="${mac_source}/mac/${collection}/${platform_version}/${arch}/${filename}"
679684
;;
680685
*)
681686
critical "Sorry $platform is not supported yet!"

0 commit comments

Comments
 (0)