puppet_litmus 2.4.2 → 2.5.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 +4 -1
- data/exe/matrix_from_metadata_v3 +6 -6
- data/lib/puppet_litmus/version.rb +1 -1
- data/spec/exe/matrix_from_metadata_v3_spec.rb +30 -4
- data/spec/spec_helper.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e97ff4ce76e4656aec5eb55859964253b95e3dd07f46427bd96a3119d959b78b
|
|
4
|
+
data.tar.gz: 8101b71b60904bb20870bc6504296dd86b12e30dd2080f5a45a56bc0a7f232d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ae92889a2b3c5a46831817810059137e2d069c841a7ae156fcc90ebd112990f6023c33deaab5864dfdca32a64eb34aa83886f6a7cc394a58e20a8c3fb0798e1
|
|
7
|
+
data.tar.gz: b4295446eff91e4fe63256e0a01e093c8c89b80bc38f2a3f507dd3e41aef4ef6404754947428021b4452acd84890099d97a50307ab94a4ffc39dde4f4974f36a
|
data/exe/matrix.json
CHANGED
|
@@ -76,6 +76,9 @@
|
|
|
76
76
|
"Scientific": {
|
|
77
77
|
"7": { "x86_64": "litmusimage/scientificlinux:7" }
|
|
78
78
|
},
|
|
79
|
+
"SLES": {
|
|
80
|
+
"15": { "x86_64": "litmusimage/sles:15" }
|
|
81
|
+
},
|
|
79
82
|
"Ubuntu": {
|
|
80
83
|
"18.04": { "x86_64": "litmusimage/ubuntu:18.04" },
|
|
81
84
|
"20.04": { "x86_64": "litmusimage/ubuntu:20.04" },
|
|
@@ -86,7 +89,7 @@
|
|
|
86
89
|
},
|
|
87
90
|
"github_runner": {
|
|
88
91
|
"docker": {
|
|
89
|
-
"^(AmazonLinux-2|(CentOS|OracleLinux|Scientific)-7|(AlmaLinux|OracleLinux|Rocky|CentOS)-9|AlmaLinux-8|Fedora-36|Ubuntu-18|Debian-10)":
|
|
92
|
+
"^(AmazonLinux-2|(CentOS|OracleLinux|Scientific)-7|(AlmaLinux|OracleLinux|Rocky|CentOS)-9|AlmaLinux-8|Fedora-36|SLES-15|Ubuntu-18|Debian-10)": "ubuntu-22.04"
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
}
|
data/exe/matrix_from_metadata_v3
CHANGED
|
@@ -281,12 +281,12 @@ options[:metadata]['requirements']&.each do |req|
|
|
|
281
281
|
end
|
|
282
282
|
|
|
283
283
|
version = collection['puppet'].to_i
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
284
|
+
forge_token = ENV.fetch('PUPPET_FORGE_TOKEN', nil)
|
|
285
|
+
prefix = forge_token ? 'puppetcore' : 'puppet'
|
|
286
|
+
nightly = options[:nightly] && forge_token
|
|
287
|
+
Action.warning('--nightly ignored: PUPPET_FORGE_TOKEN is not set, falling back to public puppet collection') \
|
|
288
|
+
if options[:nightly] && !forge_token
|
|
289
|
+
group = nightly ? "#{prefix}#{version}-nightly" : "#{prefix}#{version}"
|
|
290
290
|
matrix[:collection] << if options[:latest_agent] && collection['puppet'] != 'nightly'
|
|
291
291
|
require 'net/http'
|
|
292
292
|
require 'json'
|
|
@@ -232,9 +232,8 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
232
232
|
'::group::matrix',
|
|
233
233
|
'::group::spec_matrix'
|
|
234
234
|
)
|
|
235
|
-
expect(github_output_content).to
|
|
236
|
-
|
|
237
|
-
)
|
|
235
|
+
expect(github_output_content).to match(/"collection":\["\d{4}\.\d\.\d-puppet_enterprise","\d{4}\.\d\.\d-puppet_enterprise","puppetcore8"/)
|
|
236
|
+
|
|
238
237
|
expect(github_output_content).to include(
|
|
239
238
|
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
240
239
|
)
|
|
@@ -242,7 +241,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
242
241
|
end
|
|
243
242
|
|
|
244
243
|
context 'with argument --nightly' do
|
|
245
|
-
let(:result) { run_matrix_from_metadata_v3(['--puppetlabs', '--nightly']) }
|
|
244
|
+
let(:result) { run_matrix_from_metadata_v3(['--puppetlabs', '--nightly'], env: { 'PUPPET_FORGE_TOKEN' => 'fake_token' }) }
|
|
246
245
|
let(:matrix) do
|
|
247
246
|
[
|
|
248
247
|
'matrix={',
|
|
@@ -281,6 +280,32 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
281
280
|
end
|
|
282
281
|
end
|
|
283
282
|
|
|
283
|
+
context 'with --nightly and no PUPPET_FORGE_TOKEN' do
|
|
284
|
+
let(:result) { run_matrix_from_metadata_v3(['--nightly'], env: { 'PUPPET_FORGE_TOKEN' => nil }) }
|
|
285
|
+
|
|
286
|
+
it 'run successfully' do
|
|
287
|
+
expect(result.status_code).to eq 0
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
it 'falls back to public puppet collection with a warning' do
|
|
291
|
+
expect(result.stdout).to include('--nightly ignored: PUPPET_FORGE_TOKEN is not set, falling back to public puppet collection')
|
|
292
|
+
expect(github_output_content).to include('"collection":["puppet8"]')
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
context 'without PUPPET_FORGE_TOKEN' do
|
|
297
|
+
let(:result) { run_matrix_from_metadata_v3(['--puppetlabs'], env: { 'PUPPET_FORGE_TOKEN' => nil }) }
|
|
298
|
+
|
|
299
|
+
it 'run successfully' do
|
|
300
|
+
expect(result.status_code).to eq 0
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
it 'falls back to public puppet collection' do
|
|
304
|
+
result
|
|
305
|
+
expect(github_output_content).to include('"collection":["puppet8"]')
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
|
|
284
309
|
context 'with argument --latest-agent' do
|
|
285
310
|
let(:result) { run_matrix_from_metadata_v3(['--puppetlabs', '--latest-agent']) }
|
|
286
311
|
|
|
@@ -296,6 +321,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
296
321
|
'::group::spec_matrix'
|
|
297
322
|
)
|
|
298
323
|
expect(github_output_content).to match(/{"collection":"puppetcore8","version":"\d+\.\d+\.\d+"}/)
|
|
324
|
+
|
|
299
325
|
expect(github_output_content).to include(
|
|
300
326
|
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
301
327
|
)
|
data/spec/spec_helper.rb
CHANGED
|
@@ -38,14 +38,14 @@ def run_matrix_from_metadata_v2(options = {})
|
|
|
38
38
|
)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
def run_matrix_from_metadata_v3(options = [])
|
|
41
|
+
def run_matrix_from_metadata_v3(options = [], env: {})
|
|
42
42
|
command = %w[bundle exec ./exe/matrix_from_metadata_v3]
|
|
43
43
|
unless options.include? '--metadata'
|
|
44
44
|
options << '--metadata'
|
|
45
45
|
options << File.join(File.dirname(__FILE__), 'exe', 'fake_metadata.json')
|
|
46
46
|
end
|
|
47
47
|
command += options
|
|
48
|
-
result = Open3.capture3(*command)
|
|
48
|
+
result = Open3.capture3(env, *command)
|
|
49
49
|
OpenStruct.new(
|
|
50
50
|
stdout: result[0],
|
|
51
51
|
stderr: result[1],
|
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.5.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:
|
|
11
|
+
date: 2026-04-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bolt
|
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
184
184
|
- !ruby/object:Gem::Version
|
|
185
185
|
version: '0'
|
|
186
186
|
requirements: []
|
|
187
|
-
rubygems_version: 3.
|
|
187
|
+
rubygems_version: 3.4.19
|
|
188
188
|
signing_key:
|
|
189
189
|
specification_version: 4
|
|
190
190
|
summary: Providing a simple command line tool for puppet content creators, to enable
|