puppet_litmus 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/matrix.json +12 -4
- data/exe/matrix_from_metadata_v2 +6 -1
- data/exe/matrix_from_metadata_v3 +19 -15
- data/lib/puppet_litmus/inventory_manipulation.rb +4 -5
- data/lib/puppet_litmus/rake_helper.rb +1 -1
- data/lib/puppet_litmus/version.rb +1 -1
- data/spec/exe/fake_metadata.json +3 -2
- data/spec/exe/matrix_from_metadata_v2_spec.rb +19 -13
- data/spec/exe/matrix_from_metadata_v3_spec.rb +27 -19
- data/spec/lib/puppet_litmus/puppet_helpers_spec.rb +1 -1
- data/spec/lib/puppet_litmus/rake_helper_spec.rb +7 -7
- data/spec/lib/puppet_litmus/rake_tasks_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae343528c6aa1a501ab3a74a35413af6fa597549117eabeb8187c34620ace77b
|
|
4
|
+
data.tar.gz: '084246ae80f218ff9fee07e7dc207ffafca0d1c88e4d7bf43f4698857465098c'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b04fdf66b039df83064c3a2e658990269994a4916cba170b06b47bcf94c0ec45cc536fdc627aa7ca51b49ce6a394baa13a4c42e3ef568ed6175f6f5dc1181abe
|
|
7
|
+
data.tar.gz: c130ece42862fbc1434971b153b8ff3e5e0a8a8a9c397dbe423ccf5b347c621c656d9c0e8544d704b95de4257ab0dc13db0fe5870da5e81b814a6f18ace93b5c
|
data/exe/matrix.json
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
{
|
|
4
4
|
"puppet": 8.0,
|
|
5
5
|
"ruby": 3.2
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"puppet": 9.0,
|
|
9
|
+
"ruby": 4.0
|
|
6
10
|
}
|
|
7
11
|
],
|
|
8
12
|
"provisioners": {
|
|
@@ -23,12 +27,14 @@
|
|
|
23
27
|
"Debian": {
|
|
24
28
|
"10": { "x86_64": "debian-10" },
|
|
25
29
|
"11": { "x86_64": "debian-11" },
|
|
26
|
-
"12": { "x86_64": "debian-12", "arm": "debian-12-arm64" }
|
|
30
|
+
"12": { "x86_64": "debian-12", "arm": "debian-12-arm64" },
|
|
31
|
+
"13": { "x86_64": "debian-13" }
|
|
27
32
|
},
|
|
28
33
|
"RedHat": {
|
|
29
34
|
"7": { "x86_64": "rhel-7" },
|
|
30
35
|
"8": { "x86_64": "rhel-8" },
|
|
31
|
-
"9": { "x86_64": "rhel-9", "arm": "rhel-9-arm64" }
|
|
36
|
+
"9": { "x86_64": "rhel-9", "arm": "rhel-9-arm64" },
|
|
37
|
+
"10": { "x86_64": "rhel-10", "arm": "rhel-10-arm64" }
|
|
32
38
|
},
|
|
33
39
|
"SLES" : {
|
|
34
40
|
"12": { "x86_64": "sles-12" },
|
|
@@ -42,7 +48,8 @@
|
|
|
42
48
|
"Windows": {
|
|
43
49
|
"2016": { "x86_64": "windows-2016" },
|
|
44
50
|
"2019": { "x86_64": "windows-2019" },
|
|
45
|
-
"2022": { "x86_64": "windows-2022" }
|
|
51
|
+
"2022": { "x86_64": "windows-2022" },
|
|
52
|
+
"2025": { "x86_64": "windows-2025" }
|
|
46
53
|
}
|
|
47
54
|
},
|
|
48
55
|
"docker": {
|
|
@@ -66,7 +73,8 @@
|
|
|
66
73
|
"Debian": {
|
|
67
74
|
"10": { "x86_64": "litmusimage/debian:10" },
|
|
68
75
|
"11": { "x86_64": "litmusimage/debian:11" },
|
|
69
|
-
"12": { "x86_64": "litmusimage/debian:12" }
|
|
76
|
+
"12": { "x86_64": "litmusimage/debian:12" },
|
|
77
|
+
"13": { "x86_64": "litmusimage/debian:13" }
|
|
70
78
|
},
|
|
71
79
|
"OracleLinux": {
|
|
72
80
|
"7": { "x86_64": "litmusimage/oraclelinux:7" },
|
data/exe/matrix_from_metadata_v2
CHANGED
|
@@ -28,16 +28,19 @@ IMAGE_TABLE = {
|
|
|
28
28
|
'RedHat-7' => 'rhel-7',
|
|
29
29
|
'RedHat-8' => 'rhel-8',
|
|
30
30
|
'RedHat-9' => 'rhel-9',
|
|
31
|
+
'RedHat-10' => 'rhel-10',
|
|
31
32
|
'SLES-12' => 'sles-12',
|
|
32
33
|
'SLES-15' => 'sles-15',
|
|
33
34
|
'Windows-2016' => 'windows-2016',
|
|
34
35
|
'Windows-2019' => 'windows-2019',
|
|
35
|
-
'Windows-2022' => 'windows-2022'
|
|
36
|
+
'Windows-2022' => 'windows-2022',
|
|
37
|
+
'Windows-2025' => 'windows-2025'
|
|
36
38
|
}.freeze
|
|
37
39
|
|
|
38
40
|
ARM_IMAGE_TABLE = {
|
|
39
41
|
'Debian-12-arm' => 'debian-12-arm64',
|
|
40
42
|
'RedHat-9-arm' => 'rhel-9-arm64',
|
|
43
|
+
'RedHat-10-arm' => 'rhel-10-arm64',
|
|
41
44
|
'Ubuntu-22.04-arm' => 'ubuntu-2204-lts-arm64',
|
|
42
45
|
'Ubuntu-24.04-arm' => 'ubuntu-2404-lts-arm64'
|
|
43
46
|
}.freeze
|
|
@@ -55,6 +58,7 @@ DOCKER_PLATFORMS = {
|
|
|
55
58
|
'Debian-10' => 'litmusimage/debian:10',
|
|
56
59
|
'Debian-11' => 'litmusimage/debian:11',
|
|
57
60
|
'Debian-12' => 'litmusimage/debian:12',
|
|
61
|
+
'Debian-13' => 'litmusimage/debian:13',
|
|
58
62
|
'OracleLinux-7' => 'litmusimage/oraclelinux:7',
|
|
59
63
|
'OracleLinux-8' => 'litmusimage/oraclelinux:8',
|
|
60
64
|
'OracleLinux-9' => 'litmusimage/oraclelinux:9',
|
|
@@ -120,6 +124,7 @@ if ARGV.include?('--provision-service')
|
|
|
120
124
|
'Debian-10' => 'debian-10',
|
|
121
125
|
'Debian-11' => 'debian-11',
|
|
122
126
|
'Debian-12' => 'debian-12',
|
|
127
|
+
'Debian-13' => 'debian-13',
|
|
123
128
|
'Ubuntu-20.04' => 'ubuntu-2004-lts',
|
|
124
129
|
'Ubuntu-22.04' => 'ubuntu-2204-lts',
|
|
125
130
|
'Ubuntu-24.04' => 'ubuntu-2404-lts'
|
data/exe/matrix_from_metadata_v3
CHANGED
|
@@ -287,21 +287,25 @@ options[:metadata]['requirements']&.each do |req|
|
|
|
287
287
|
Action.warning('--nightly ignored: PUPPET_FORGE_TOKEN is not set, falling back to public puppet collection') \
|
|
288
288
|
if options[:nightly] && !forge_token
|
|
289
289
|
group = nightly ? "#{prefix}#{version}-nightly" : "#{prefix}#{version}"
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
290
|
+
|
|
291
|
+
# puppet 9+ is only published via puppetcore; skip it when falling back to the public collection
|
|
292
|
+
if forge_token || version < 9
|
|
293
|
+
matrix[:collection] << if options[:latest_agent] && collection['puppet'] != 'nightly'
|
|
294
|
+
require 'net/http'
|
|
295
|
+
require 'json'
|
|
296
|
+
require 'uri'
|
|
297
|
+
|
|
298
|
+
uri = URI('https://forgeapi.puppet.com/private/versions/puppet-agent')
|
|
299
|
+
response = Net::HTTP.get_response(uri)
|
|
300
|
+
json_data = JSON.parse(response.body)
|
|
301
|
+
all_versions = json_data.keys
|
|
302
|
+
versionx = all_versions.select { |v| v.start_with?("#{collection['puppet'].to_i}.") }
|
|
303
|
+
versionx.sort_by { |v| Gem::Version.new(v) }.last # rubocop:disable Style/RedundantSort
|
|
304
|
+
{ collection: group, version: agent_version }
|
|
305
|
+
else
|
|
306
|
+
group
|
|
307
|
+
end
|
|
308
|
+
end
|
|
305
309
|
|
|
306
310
|
spec_matrix[:include] << {
|
|
307
311
|
puppet_version: "~> #{collection['puppet']}",
|
|
@@ -42,11 +42,10 @@ module PuppetLitmus::InventoryManipulation
|
|
|
42
42
|
# @param targets [Array]
|
|
43
43
|
# @return [Array] array of targets.
|
|
44
44
|
def find_targets(inventory_hash, targets)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
end
|
|
45
|
+
return [targets] unless targets.nil?
|
|
46
|
+
return [] unless inventory_hash['groups']
|
|
47
|
+
|
|
48
|
+
targets_in_inventory(inventory_hash) { |target| target['uri'] }
|
|
50
49
|
end
|
|
51
50
|
|
|
52
51
|
# Recursively find and iterate over the groups in an inventory. If no block is passed
|
|
@@ -133,7 +133,7 @@ module PuppetLitmus::RakeHelper # rubocop:disable Metrics/ModuleLength
|
|
|
133
133
|
# Skip forge token assignation when pointing to private collection endpoints as it is only accesible via VPN and it fails when credentials are passed.
|
|
134
134
|
forge_token = ENV.fetch('PUPPET_FORGE_TOKEN', nil)
|
|
135
135
|
params = {}
|
|
136
|
-
params['password'] = forge_token
|
|
136
|
+
params['password'] = forge_token unless !forge_token || (collection.start_with?('puppetcore') && collection.end_with?('-nightly'))
|
|
137
137
|
params['collection'] = collection if collection
|
|
138
138
|
params['version'] = puppet_version if puppet_version
|
|
139
139
|
|
data/spec/exe/fake_metadata.json
CHANGED
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"operatingsystem": "RedHat",
|
|
32
32
|
"operatingsystemrelease": [
|
|
33
33
|
"8",
|
|
34
|
-
"9"
|
|
34
|
+
"9",
|
|
35
|
+
"10"
|
|
35
36
|
]
|
|
36
37
|
},
|
|
37
38
|
{
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"requirements": [
|
|
47
48
|
{
|
|
48
49
|
"name": "puppet",
|
|
49
|
-
"version_requirement": ">=
|
|
50
|
+
"version_requirement": ">= 8.0.0 < 10.0.0"
|
|
50
51
|
}
|
|
51
52
|
],
|
|
52
53
|
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
|
|
@@ -25,6 +25,8 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
25
25
|
'"platforms":[',
|
|
26
26
|
'{"label":"AmazonLinux-2","provider":"docker","image":"litmusimage/amazonlinux:2"},',
|
|
27
27
|
'{"label":"AmazonLinux-2023","provider":"docker","image":"litmusimage/amazonlinux:2023"},',
|
|
28
|
+
'{"label":"RedHat-10","provider":"provision_service","image":"rhel-10"},',
|
|
29
|
+
'{"label":"RedHat-10-arm","provider":"provision_service","image":"rhel-10-arm64"},',
|
|
28
30
|
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
|
|
29
31
|
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
|
|
30
32
|
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
|
|
@@ -33,15 +35,15 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
33
35
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","image":"ubuntu-2204-lts-arm64"}',
|
|
34
36
|
'],',
|
|
35
37
|
'"collection":[',
|
|
36
|
-
'"
|
|
38
|
+
'"puppetcore8"',
|
|
37
39
|
']',
|
|
38
40
|
'}'
|
|
39
41
|
].join
|
|
40
42
|
)
|
|
41
43
|
expect(github_output_content).to include(
|
|
42
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
44
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
43
45
|
)
|
|
44
|
-
expect(result.stdout).to include("Created matrix with
|
|
46
|
+
expect(result.stdout).to include("Created matrix with 11 cells:\n - Acceptance Test Cells: 10\n - Spec Test Cells: 1")
|
|
45
47
|
end
|
|
46
48
|
end
|
|
47
49
|
|
|
@@ -68,6 +70,8 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
68
70
|
'"platforms":[',
|
|
69
71
|
'{"label":"AmazonLinux-2","provider":"docker","image":"litmusimage/amazonlinux:2"},',
|
|
70
72
|
'{"label":"AmazonLinux-2023","provider":"docker","image":"litmusimage/amazonlinux:2023"},',
|
|
73
|
+
'{"label":"RedHat-10","provider":"provision_service","image":"rhel-10"},',
|
|
74
|
+
'{"label":"RedHat-10-arm","provider":"provision_service","image":"rhel-10-arm64"},',
|
|
71
75
|
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
|
|
72
76
|
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
|
|
73
77
|
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
|
|
@@ -75,15 +79,15 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
75
79
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","image":"ubuntu-2204-lts-arm64"}',
|
|
76
80
|
'],',
|
|
77
81
|
'"collection":[',
|
|
78
|
-
'"
|
|
82
|
+
'"puppetcore8"',
|
|
79
83
|
']',
|
|
80
84
|
'}'
|
|
81
85
|
].join
|
|
82
86
|
)
|
|
83
87
|
expect(github_output_content).to include(
|
|
84
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
88
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
85
89
|
)
|
|
86
|
-
expect(result.stdout).to include("Created matrix with
|
|
90
|
+
expect(result.stdout).to include("Created matrix with 10 cells:\n - Acceptance Test Cells: 9\n - Spec Test Cells: 1")
|
|
87
91
|
end
|
|
88
92
|
end
|
|
89
93
|
|
|
@@ -100,7 +104,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
100
104
|
expect(result.status_code).to eq 0
|
|
101
105
|
end
|
|
102
106
|
|
|
103
|
-
it 'generates the matrix without excluded platforms' do
|
|
107
|
+
it 'generates the matrix without excluded platforms' do # rubocop:disable RSpec/ExampleLength
|
|
104
108
|
expect(result.stdout).to include('::warning::Cannot find image for Ubuntu-14.04')
|
|
105
109
|
expect(result.stdout).to include('::warning::Cannot find image for CentOS-6')
|
|
106
110
|
expect(result.stdout).to include('::warning::Ubuntu-18.04 was excluded from testing')
|
|
@@ -110,19 +114,21 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
110
114
|
[
|
|
111
115
|
'matrix={',
|
|
112
116
|
'"platforms":[',
|
|
117
|
+
'{"label":"RedHat-10","provider":"provision_service","image":"rhel-10"},',
|
|
118
|
+
'{"label":"RedHat-10-arm","provider":"provision_service","image":"rhel-10-arm64"},',
|
|
113
119
|
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
|
|
114
120
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","image":"ubuntu-2204-lts-arm64"}',
|
|
115
121
|
'],',
|
|
116
122
|
'"collection":[',
|
|
117
|
-
'"
|
|
123
|
+
'"puppetcore8"',
|
|
118
124
|
']',
|
|
119
125
|
'}'
|
|
120
126
|
].join
|
|
121
127
|
)
|
|
122
128
|
expect(github_output_content).to include(
|
|
123
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
129
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
124
130
|
)
|
|
125
|
-
expect(result.stdout).to include("Created matrix with
|
|
131
|
+
expect(result.stdout).to include("Created matrix with 5 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 1")
|
|
126
132
|
end
|
|
127
133
|
end
|
|
128
134
|
|
|
@@ -153,15 +159,15 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
153
159
|
'{"label":"Ubuntu-22.04","provider":"docker","image":"litmusimage/ubuntu:22.04"}',
|
|
154
160
|
'],',
|
|
155
161
|
'"collection":[',
|
|
156
|
-
'"
|
|
162
|
+
'"puppetcore8"',
|
|
157
163
|
']',
|
|
158
164
|
'}'
|
|
159
165
|
].join
|
|
160
166
|
)
|
|
161
167
|
expect(github_output_content).to include(
|
|
162
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
168
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
163
169
|
)
|
|
164
|
-
expect(result.stdout).to include("Created matrix with
|
|
170
|
+
expect(result.stdout).to include("Created matrix with 5 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 1")
|
|
165
171
|
end
|
|
166
172
|
end
|
|
167
173
|
end
|
|
@@ -30,7 +30,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
30
30
|
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"}',
|
|
31
31
|
'],',
|
|
32
32
|
'"collection":[',
|
|
33
|
-
'"puppetcore8"',
|
|
33
|
+
'"puppetcore8","puppetcore9"',
|
|
34
34
|
']',
|
|
35
35
|
'}'
|
|
36
36
|
].join
|
|
@@ -41,7 +41,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
41
41
|
'::group::spec_matrix'
|
|
42
42
|
)
|
|
43
43
|
expect(github_output_content).to include(matrix)
|
|
44
|
-
expect(github_output_content).to include('spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}')
|
|
44
|
+
expect(github_output_content).to include('spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}')
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -58,12 +58,14 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
58
58
|
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
|
|
59
59
|
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
|
|
60
60
|
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
|
|
61
|
+
'{"label":"RedHat-10","provider":"provision_service","arch":"x86_64","image":"rhel-10","runner":"ubuntu-latest"},',
|
|
62
|
+
'{"label":"RedHat-10-arm","provider":"provision_service","arch":"arm","image":"rhel-10-arm64","runner":"ubuntu-latest"},',
|
|
61
63
|
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
|
|
62
64
|
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
|
|
63
65
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
64
66
|
'],',
|
|
65
67
|
'"collection":[',
|
|
66
|
-
'"puppetcore8"',
|
|
68
|
+
'"puppetcore8","puppetcore9"',
|
|
67
69
|
']',
|
|
68
70
|
'}'
|
|
69
71
|
].join
|
|
@@ -82,7 +84,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
82
84
|
)
|
|
83
85
|
expect(github_output_content).to include(matrix)
|
|
84
86
|
expect(github_output_content).to include(
|
|
85
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
87
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
86
88
|
)
|
|
87
89
|
end
|
|
88
90
|
end
|
|
@@ -98,12 +100,14 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
98
100
|
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
|
|
99
101
|
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
|
|
100
102
|
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
|
|
103
|
+
'{"label":"RedHat-10","provider":"provision_service","arch":"x86_64","image":"rhel-10","runner":"ubuntu-latest"},',
|
|
104
|
+
'{"label":"RedHat-10-arm","provider":"provision_service","arch":"arm","image":"rhel-10-arm64","runner":"ubuntu-latest"},',
|
|
101
105
|
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
|
|
102
106
|
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
|
|
103
107
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
104
108
|
'],',
|
|
105
109
|
'"collection":[',
|
|
106
|
-
'"puppetcore8"',
|
|
110
|
+
'"puppetcore8","puppetcore9"',
|
|
107
111
|
']',
|
|
108
112
|
'}'
|
|
109
113
|
].join
|
|
@@ -122,7 +126,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
122
126
|
)
|
|
123
127
|
expect(github_output_content).to include(matrix)
|
|
124
128
|
expect(github_output_content).to include(
|
|
125
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
129
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
126
130
|
)
|
|
127
131
|
end
|
|
128
132
|
end
|
|
@@ -138,11 +142,13 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
138
142
|
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
|
|
139
143
|
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
|
|
140
144
|
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
|
|
145
|
+
'{"label":"RedHat-10","provider":"provision_service","arch":"x86_64","image":"rhel-10","runner":"ubuntu-latest"},',
|
|
146
|
+
'{"label":"RedHat-10-arm","provider":"provision_service","arch":"arm","image":"rhel-10-arm64","runner":"ubuntu-latest"},',
|
|
141
147
|
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
|
|
142
148
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
143
149
|
'],',
|
|
144
150
|
'"collection":[',
|
|
145
|
-
'"puppetcore8"',
|
|
151
|
+
'"puppetcore8","puppetcore9"',
|
|
146
152
|
']',
|
|
147
153
|
'}'
|
|
148
154
|
].join
|
|
@@ -162,20 +168,20 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
162
168
|
)
|
|
163
169
|
expect(github_output_content).to include(matrix)
|
|
164
170
|
expect(github_output_content).to include(
|
|
165
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
171
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
166
172
|
)
|
|
167
173
|
end
|
|
168
174
|
end
|
|
169
175
|
|
|
170
|
-
context 'with --platform-exclude "ubuntu-(18.04|22.04)" --platform-exclude "redhat-
|
|
171
|
-
let(:result) { run_matrix_from_metadata_v3(['--puppetlabs', '--platform-exclude', '(amazonlinux|ubuntu)-(2|18.04|22.04|2023)', '--platform-exclude', 'redhat-
|
|
176
|
+
context 'with --platform-exclude "ubuntu-(18.04|22.04)" --platform-exclude "redhat-(8|9|10)"' do
|
|
177
|
+
let(:result) { run_matrix_from_metadata_v3(['--puppetlabs', '--platform-exclude', '(amazonlinux|ubuntu)-(2|18.04|22.04|2023)', '--platform-exclude', 'redhat-(8|9|10)']) }
|
|
172
178
|
let(:matrix) do
|
|
173
179
|
[
|
|
174
180
|
'matrix={',
|
|
175
181
|
'"platforms":[',
|
|
176
182
|
'],',
|
|
177
183
|
'"collection":[',
|
|
178
|
-
'"puppetcore8"',
|
|
184
|
+
'"puppetcore8","puppetcore9"',
|
|
179
185
|
']',
|
|
180
186
|
'}'
|
|
181
187
|
].join
|
|
@@ -191,6 +197,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
191
197
|
'::warning::Ubuntu-14.04 no provisioner found',
|
|
192
198
|
'::notice::platform-exclude filtered RedHat-8',
|
|
193
199
|
'::notice::platform-exclude filtered RedHat-9',
|
|
200
|
+
'::notice::platform-exclude filtered RedHat-10',
|
|
194
201
|
'::notice::platform-exclude filtered Ubuntu-18.04',
|
|
195
202
|
'::notice::platform-exclude filtered Ubuntu-22.04',
|
|
196
203
|
'::group::matrix',
|
|
@@ -198,7 +205,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
198
205
|
)
|
|
199
206
|
expect(github_output_content).to include(matrix)
|
|
200
207
|
expect(github_output_content).to include(
|
|
201
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
208
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
202
209
|
)
|
|
203
210
|
end
|
|
204
211
|
end
|
|
@@ -232,10 +239,9 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
232
239
|
'::group::matrix',
|
|
233
240
|
'::group::spec_matrix'
|
|
234
241
|
)
|
|
235
|
-
expect(github_output_content).to match(/"collection":\["\d{4}\.\d\.\d-puppet_enterprise","
|
|
236
|
-
|
|
242
|
+
expect(github_output_content).to match(/"collection":\[(?:"\d{4}\.\d\.\d-puppet_enterprise",)+"puppetcore8","puppetcore9"/)
|
|
237
243
|
expect(github_output_content).to include(
|
|
238
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
244
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
239
245
|
)
|
|
240
246
|
end
|
|
241
247
|
end
|
|
@@ -251,12 +257,14 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
251
257
|
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
|
|
252
258
|
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
|
|
253
259
|
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
|
|
260
|
+
'{"label":"RedHat-10","provider":"provision_service","arch":"x86_64","image":"rhel-10","runner":"ubuntu-latest"},',
|
|
261
|
+
'{"label":"RedHat-10-arm","provider":"provision_service","arch":"arm","image":"rhel-10-arm64","runner":"ubuntu-latest"},',
|
|
254
262
|
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
|
|
255
263
|
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
|
|
256
264
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
257
265
|
'],',
|
|
258
266
|
'"collection":[',
|
|
259
|
-
'"puppetcore8-nightly"',
|
|
267
|
+
'"puppetcore8-nightly","puppetcore9-nightly"',
|
|
260
268
|
']',
|
|
261
269
|
'}'
|
|
262
270
|
].join
|
|
@@ -275,7 +283,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
275
283
|
)
|
|
276
284
|
expect(github_output_content).to include(matrix)
|
|
277
285
|
expect(github_output_content).to include(
|
|
278
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
286
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
279
287
|
)
|
|
280
288
|
end
|
|
281
289
|
end
|
|
@@ -321,9 +329,9 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
321
329
|
'::group::spec_matrix'
|
|
322
330
|
)
|
|
323
331
|
expect(github_output_content).to match(/{"collection":"puppetcore8","version":"\d+\.\d+\.\d+"}/)
|
|
324
|
-
|
|
332
|
+
expect(github_output_content).to match(/{"collection":"puppetcore9","version":("\d+\.\d+\.\d+"|null)}/)
|
|
325
333
|
expect(github_output_content).to include(
|
|
326
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
334
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
327
335
|
)
|
|
328
336
|
end
|
|
329
337
|
end
|
|
@@ -275,7 +275,7 @@ RSpec.describe PuppetLitmus::PuppetHelpers do
|
|
|
275
275
|
expect(self).to receive(:target_in_inventory?).and_return(true)
|
|
276
276
|
expect(self).to receive(:run_task).with(task_name, 'some.host', params, config: config_data, inventory: inventory_hash).and_return(result_structured_task_success)
|
|
277
277
|
method_result = run_bolt_task(task_name, params, opts: {})
|
|
278
|
-
expect(method_result.stdout).to eq('
|
|
278
|
+
expect(method_result.stdout).to eq({ 'key1' => 'foo', 'key2' => 'bar' }.to_s)
|
|
279
279
|
expect(method_result.result['key1']).to eq('foo')
|
|
280
280
|
expect(method_result.result['key2']).to eq('bar')
|
|
281
281
|
end
|
|
@@ -132,32 +132,32 @@ RSpec.describe PuppetLitmus::RakeHelper do
|
|
|
132
132
|
end
|
|
133
133
|
let(:targets) { ['some.host'] }
|
|
134
134
|
let(:token) { 'some_token' }
|
|
135
|
-
let(:params) { { 'collection' => '
|
|
135
|
+
let(:params) { { 'collection' => 'puppet8', 'password' => token } }
|
|
136
136
|
|
|
137
137
|
it 'calls function' do
|
|
138
138
|
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return(nil)
|
|
139
139
|
allow(ENV).to receive(:fetch).with('PUPPET_FORGE_TOKEN', nil).and_return(token)
|
|
140
140
|
allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'puppet_agent')).and_return(true)
|
|
141
141
|
allow_any_instance_of(BoltSpec::Run).to receive(:run_task).with('puppet_agent::install', targets, params, config: described_class::DEFAULT_CONFIG_DATA, inventory: inventory_hash).and_return([])
|
|
142
|
-
install_agent('
|
|
142
|
+
install_agent('puppet8', targets, inventory_hash)
|
|
143
143
|
end
|
|
144
144
|
|
|
145
145
|
it 'adds puppet version' do
|
|
146
|
-
params = { 'collection' => '
|
|
147
|
-
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return('
|
|
146
|
+
params = { 'collection' => 'puppet8', 'version' => '8.0.0' }
|
|
147
|
+
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return('8.0.0')
|
|
148
148
|
allow(ENV).to receive(:fetch).with('PUPPET_FORGE_TOKEN', nil).and_return(nil)
|
|
149
149
|
allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'puppet_agent')).and_return(true)
|
|
150
150
|
allow_any_instance_of(BoltSpec::Run).to receive(:run_task).with('puppet_agent::install', targets, params, config: described_class::DEFAULT_CONFIG_DATA, inventory: inventory_hash).and_return([])
|
|
151
|
-
install_agent('
|
|
151
|
+
install_agent('puppet8', targets, inventory_hash)
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
it 'fails for puppetcore if no token supplied' do
|
|
155
|
-
params = { 'collection' => '
|
|
155
|
+
params = { 'collection' => 'puppetcore8' }
|
|
156
156
|
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return(nil)
|
|
157
157
|
allow(ENV).to receive(:fetch).with('PUPPET_FORGE_TOKEN', nil).and_return(nil)
|
|
158
158
|
allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'puppet_agent')).and_return(true)
|
|
159
159
|
allow_any_instance_of(BoltSpec::Run).to receive(:run_task).with('puppet_agent::install', targets, params, config: described_class::DEFAULT_CONFIG_DATA, inventory: inventory_hash).and_return([])
|
|
160
|
-
expect { install_agent('
|
|
160
|
+
expect { install_agent('puppetcore8', targets, inventory_hash) }.to raise_error(RuntimeError, /puppetcore agent installs require a valid PUPPET_FORGE_TOKEN set in the env\./)
|
|
161
161
|
end
|
|
162
162
|
end
|
|
163
163
|
|
|
@@ -77,7 +77,7 @@ describe 'litmus rake tasks' do
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
context 'with litmus:install_modules_from_directory' do
|
|
80
|
-
let(:inventory_hash) { { 'groups' => [{ 'name' => 'ssh_nodes', '
|
|
80
|
+
let(:inventory_hash) { { 'groups' => [{ 'name' => 'ssh_nodes', 'targets' => [{ 'uri' => 'some.host' }] }] } }
|
|
81
81
|
let(:target_dir) { File.join(Dir.pwd, 'spec/fixtures/modules') }
|
|
82
82
|
let(:dummy_tar) { 'spec/data/doot.tar.gz' }
|
|
83
83
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: puppet_litmus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bolt
|