puppet_litmus 2.0.0 → 2.2.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/README.md +5 -0
- data/exe/matrix_from_metadata_v2 +8 -1
- data/exe/matrix_from_metadata_v3 +9 -1
- data/lib/puppet_litmus/version.rb +1 -1
- data/spec/exe/matrix_from_metadata_v3_spec.rb +41 -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: a90707a24847ee4fe4f60fcaaaab2fa842a74e0427ff1a07ca04175ba43e3062
|
4
|
+
data.tar.gz: 3e795719a624a4fab0471ba2c6cf4ddf57b660e36cade3b85552d6e36f0f0ee1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef6091982bf5b706ac9ed64cd17c09c2e89840a8d84a6ed7f236c291975056bd09c17e8d8377c228bdc4a03f65ef566fe35a99d2f78f26dbc2bebd7cbc1bf070
|
7
|
+
data.tar.gz: 8623539b486ae72bb584da01831d2c02778f2fa92af7710bd1583dcc19622887b38b5177be56fb83422b7d4ea9b68ba7f58a8fa0270cfd0b891c1a8895d272ae
|
data/README.md
CHANGED
@@ -73,6 +73,7 @@ in the project module root directory run `bundle exec matrix_from_metadata_v3`
|
|
73
73
|
| --provision-prefer | NAME | docker | Prefer provisioner |
|
74
74
|
| --provision-include | NAME | all | Select provisioner |
|
75
75
|
| --provision-exclude | NAME | provision_service | Filter provisioner |
|
76
|
+
| --nightly | | | Install from the nightly puppetcore images |
|
76
77
|
|
77
78
|
> Refer to the [built-in matrix.json](https://github.com/puppetlabs/puppet_litmus/blob/main/exe/matrix.json) for a list of supported collection, provisioners, and platforms.
|
78
79
|
|
@@ -90,6 +91,10 @@ in the project module root directory run `bundle exec matrix_from_metadata_v3`
|
|
90
91
|
```sh
|
91
92
|
matrix_from_metadata_v3 --arch-exclude x86_64
|
92
93
|
```
|
94
|
+
* Run against the nightly puppetcore images
|
95
|
+
```sh
|
96
|
+
matrix_from_metadata_v3 --nightly
|
97
|
+
```
|
93
98
|
|
94
99
|
## Documentation
|
95
100
|
|
data/exe/matrix_from_metadata_v2
CHANGED
@@ -231,7 +231,14 @@ end
|
|
231
231
|
|
232
232
|
puts '::warning::matrix_from_metadata_v2 is now deprecated and will be removed in puppet_litmus v3, please migrate to matrix_from_metadata_v3.'
|
233
233
|
# Set to defaults (all collections) if no matches are found
|
234
|
-
|
234
|
+
if matrix[:collection].empty?
|
235
|
+
COLLECTION_TABLE.map do |collection|
|
236
|
+
version = collection[:puppet_maj_version]
|
237
|
+
prefix = version == 7 ? 'puppet' : 'puppetcore'
|
238
|
+
"#{prefix}#{version}-nightly"
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
235
242
|
# Just to make sure there aren't any duplicates
|
236
243
|
matrix[:platforms] = matrix[:platforms].uniq.sort_by { |a| a[:label] } unless ARGV.include?('--custom-matrix')
|
237
244
|
matrix[:collection] = matrix[:collection].uniq.sort
|
data/exe/matrix_from_metadata_v3
CHANGED
@@ -161,6 +161,8 @@ begin
|
|
161
161
|
opt.on('--provision-prefer NAME', String, "Prefer provisioner (default: #{default_options[:'provision-prefer']})") { |o| options.provision_prefer.push(*o.split(',')) }
|
162
162
|
opt.on('--provision-include NAME', String, 'Select provisioner (default: all)') { |o| options.provision_include.push(*o.split(',')) }
|
163
163
|
opt.on('--provision-exclude NAME', String, "Filter provisioner (default: #{default_options[:'provision-exclude'] || 'none'})") { |o| options.provision_exclude.push(*o.split(',')) }
|
164
|
+
|
165
|
+
opt.on('--nightly', TrueClass, 'Enable nightly builds') { |o| options.nightly = o }
|
164
166
|
end.parse!
|
165
167
|
|
166
168
|
Action.config(debug: true) if options[:debug]
|
@@ -260,7 +262,13 @@ options[:metadata]['requirements']&.each do |req|
|
|
260
262
|
# This assumes that such a boundary will always allow the latest actually existing puppet version of a release stream, trading off simplicity vs accuracy here.
|
261
263
|
next unless gem_req.satisfied_by?(Gem::Version.new("#{collection['puppet'].to_i}.9999"))
|
262
264
|
|
263
|
-
|
265
|
+
version = collection['puppet'].to_i
|
266
|
+
prefix = 'puppetcore'
|
267
|
+
matrix[:collection] << if options[:nightly]
|
268
|
+
"#{prefix}#{version}-nightly"
|
269
|
+
else
|
270
|
+
"#{prefix}#{version}"
|
271
|
+
end
|
264
272
|
|
265
273
|
spec_matrix[:include] << {
|
266
274
|
puppet_version: "~> #{collection['puppet']}",
|
@@ -233,11 +233,51 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
233
233
|
'::group::spec_matrix'
|
234
234
|
)
|
235
235
|
expect(github_output_content).to include(
|
236
|
-
'"collection":["2023.8.
|
236
|
+
'"collection":["2023.8.4-puppet_enterprise","2021.7.9-puppet_enterprise","puppetcore8"'
|
237
237
|
)
|
238
238
|
expect(github_output_content).to include(
|
239
239
|
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
240
240
|
)
|
241
241
|
end
|
242
242
|
end
|
243
|
+
|
244
|
+
context 'with argument --nightly' do
|
245
|
+
let(:result) { run_matrix_from_metadata_v3(['--puppetlabs', '--nightly']) }
|
246
|
+
let(:matrix) do
|
247
|
+
[
|
248
|
+
'matrix={',
|
249
|
+
'"platforms":[',
|
250
|
+
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-22.04"},',
|
251
|
+
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-22.04"},',
|
252
|
+
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
|
253
|
+
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
|
254
|
+
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
|
255
|
+
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
|
256
|
+
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
|
257
|
+
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
258
|
+
'],',
|
259
|
+
'"collection":[',
|
260
|
+
'"puppetcore8-nightly"',
|
261
|
+
']',
|
262
|
+
'}'
|
263
|
+
].join
|
264
|
+
end
|
265
|
+
|
266
|
+
it 'run successfully' do
|
267
|
+
expect(result.status_code).to eq 0
|
268
|
+
end
|
269
|
+
|
270
|
+
it 'generates the matrix' do
|
271
|
+
expect(result.stdout).to include(
|
272
|
+
'::warning::CentOS-6 no provisioner found',
|
273
|
+
'::warning::Ubuntu-14.04 no provisioner found',
|
274
|
+
'::group::matrix',
|
275
|
+
'::group::spec_matrix'
|
276
|
+
)
|
277
|
+
expect(github_output_content).to include(matrix)
|
278
|
+
expect(github_output_content).to include(
|
279
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
280
|
+
)
|
281
|
+
end
|
282
|
+
end
|
243
283
|
end
|
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.2.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: 2025-
|
11
|
+
date: 2025-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bolt
|