Skip to content

Commit e7c8c6f

Browse files
authored
Merge pull request #602 from joshcooper/macos12
(maint) Add macOS 12
2 parents 9960829 + 571e842 commit e7c8c6f

File tree

4 files changed

+67
-129
lines changed

4 files changed

+67
-129
lines changed

metadata.json

Lines changed: 40 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -27,124 +27,46 @@
2727
],
2828
"operatingsystem_support": [
2929
{
30-
"operatingsystem": "RedHat",
31-
"operatingsystemrelease": [
32-
"5",
33-
"6",
34-
"7",
35-
"8"
36-
]
37-
},
38-
{
39-
"operatingsystem": "CentOS",
40-
"operatingsystemrelease": [
41-
"5",
42-
"6",
43-
"7",
44-
"8"
45-
]
46-
},
47-
{
48-
"operatingsystem": "OracleLinux",
49-
"operatingsystemrelease": [
50-
"5",
51-
"6",
52-
"7"
53-
]
54-
},
55-
{
56-
"operatingsystem": "Scientific",
57-
"operatingsystemrelease": [
58-
"5",
59-
"6",
60-
"7"
61-
]
62-
},
63-
{
64-
"operatingsystem": "SLES",
65-
"operatingsystemrelease": [
66-
"11",
67-
"12",
68-
"15"
69-
]
70-
},
71-
{
72-
"operatingsystem": "Debian",
73-
"operatingsystemrelease": [
74-
"8",
75-
"9",
76-
"10",
77-
"11"
78-
]
79-
},
80-
{
81-
"operatingsystem": "Ubuntu",
82-
"operatingsystemrelease": [
83-
"14.04",
84-
"16.04",
85-
"18.04",
86-
"20.04"
87-
]
88-
},
89-
{
90-
"operatingsystem": "Fedora",
91-
"operatingsystemrelease": [
92-
"28",
93-
"29",
94-
"30",
95-
"31",
96-
"32",
97-
"34"
98-
]
99-
},
100-
{
101-
"operatingsystem": "Solaris",
102-
"operatingsystemrelease": [
103-
"10",
104-
"11"
105-
]
106-
},
107-
{
108-
"operatingsystem": "Windows",
109-
"operatingsystemrelease": [
110-
"Server 2008",
111-
"Server 2008 R2",
112-
"Server 2012",
113-
"Server 2012 R2",
114-
"Server 2016",
115-
"Server 2019",
116-
"7",
117-
"8",
118-
"8.1",
119-
"10"
120-
]
121-
},
122-
{
123-
"operatingsystem": "AIX",
124-
"operatingsystemrelease": [
125-
"7.1",
126-
"7.2"
127-
]
128-
},
129-
{
130-
"operatingsystem": "OSX",
131-
"operatingsystemrelease": [
132-
"10.14",
133-
"10.15",
134-
"11"
135-
]
136-
},
137-
{
138-
"operatingsystem": "AlmaLinux",
139-
"operatingsystemrelease": [
140-
"8"
141-
]
142-
},
143-
{
144-
"operatingsystem": "Rocky",
145-
"operatingsystemrelease": [
146-
"8"
147-
]
30+
"operatingsystem": "RedHat"
31+
},
32+
{
33+
"operatingsystem": "CentOS"
34+
},
35+
{
36+
"operatingsystem": "OracleLinux"
37+
},
38+
{
39+
"operatingsystem": "Scientific"
40+
},
41+
{
42+
"operatingsystem": "SLES"
43+
},
44+
{
45+
"operatingsystem": "Debian"
46+
},
47+
{
48+
"operatingsystem": "Ubuntu"
49+
},
50+
{
51+
"operatingsystem": "Fedora"
52+
},
53+
{
54+
"operatingsystem": "Solaris"
55+
},
56+
{
57+
"operatingsystem": "Windows"
58+
},
59+
{
60+
"operatingsystem": "AIX"
61+
},
62+
{
63+
"operatingsystem": "OSX"
64+
},
65+
{
66+
"operatingsystem": "AlmaLinux"
67+
},
68+
{
69+
"operatingsystem": "Rocky"
14870
}
14971
],
15072
"requirements": [

spec/classes/puppet_agent_osfamily_darwin_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
let(:params) { { package_version: package_version } }
3232

3333
context 'when running a supported OSX' do
34-
['osx-10.12-x86_64', 'osx-10.13-x86_64', 'osx-10.14-x86_64', 'osx-10.15-x86_64', 'osx-11-x86_64'].each do |tag|
34+
['osx-10.15-x86_64', 'osx-11-x86_64', 'osx-12-x86_64'].each do |tag|
3535
context "on #{tag} with no aio_version" do
3636
let(:osmajor) { tag.split('-')[1] }
3737

task_spec/spec/acceptance/init_spec.rb

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,20 @@ def target_platform
4444
'6.15.0'
4545
when %r{osx-11}
4646
'6.23.0'
47+
when %r{osx-12}
48+
'6.27.1'
4749
else
4850
'6.17.0'
4951
end
5052

53+
# we can only tests puppet 6.x -> 6.y upgrades if there multiple versions
54+
multiple_puppet6_versions = case target_platform
55+
when %r{osx-12}
56+
false
57+
else
58+
true
59+
end
60+
5161
# extra request is needed on windows hosts
5262
# this will fail with "execution expired"
5363
run_task('puppet_agent::version', 'target', {}) if %r{win}.match?(target_platform)
@@ -98,17 +108,22 @@ def target_platform
98108
expect(res['value']['source']).to be
99109
end
100110

101-
# Upgrade to latest puppet6 version
102-
results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet6', 'version' => 'latest' })
103-
expect(results).to all(include('status' => 'success'))
111+
# An OS needs to be supported for more than one 6.x release to test the
112+
# upgrade from puppet_6_version to latest
113+
if multiple_puppet6_versions
104114

105-
# Verify that it upgraded
106-
results = run_task('puppet_agent::version', 'target', {})
107-
results.each do |res|
108-
expect(res).to include('status' => 'success')
109-
expect(res['value']['version']).not_to eq(puppet_6_version)
110-
expect(res['value']['version']).to match(%r{^6\.\d+\.\d+})
111-
expect(res['value']['source']).to be
115+
# Upgrade to latest puppet6 version
116+
results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet6', 'version' => 'latest' })
117+
expect(results).to all(include('status' => 'success'))
118+
119+
# Verify that it upgraded
120+
results = run_task('puppet_agent::version', 'target', {})
121+
results.each do |res|
122+
expect(res).to include('status' => 'success')
123+
expect(res['value']['version']).not_to eq(puppet_6_version)
124+
expect(res['value']['version']).to match(%r{^6\.\d+\.\d+})
125+
expect(res['value']['source']).to be
126+
end
112127
end
113128

114129
# Puppet Agent can't be upgraded on Windows nodes while 'puppet agent' service or 'pxp-agent' service are running

tasks/install_shell.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ if [ -f "$PT__installdir/facts/tasks/bash.sh" ]; then
239239
"10.14") platform_version="10.14";;
240240
"10.15") platform_version="10.15";;
241241
"11") platform_version="11";;
242+
"12") platform_version="12";;
242243
*) echo "No builds for platform: $major_version"
243244
exit 1
244245
;;

0 commit comments

Comments
 (0)