puppet_litmus 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/exe/matrix_from_metadata_v2 +12 -3
- data/lib/puppet_litmus/version.rb +1 -1
- data/spec/exe/fake_metadata.json +1 -1
- data/spec/exe/matrix_from_metadata_v2_spec.rb +6 -4
- 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: 9a4006c91797391428323571b4c840992e4fe81bb7748515f30c89c6d9a93946
|
4
|
+
data.tar.gz: 6cd46dab531454bb491eaa2c603f9ba5a7208e88b320c660e6073e934ec95913
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc20c8b1c7a1195dccb8681849b94bf9fd207ce5dca5851927f0a0b34b78e2b74aba75ddd6d9ffef7aa1a0136b535d999d1999db5beb426ef3eaa5f1c1428e10
|
7
|
+
data.tar.gz: eb6ecbe6739466e9c243fe5c58ed16dbeb96a33c4d6c7e7638d8cdfddb261070d695f562bad4169ebd9cf296e696ce04f70c40728fd10ceb31d17a1d3289c1be
|
data/README.md
CHANGED
@@ -59,7 +59,7 @@ In order to use this new functionality, run:
|
|
59
59
|
|
60
60
|
`$: bundle exec matrix_from_metadata_v2 --custom-matrix matrix.json`
|
61
61
|
|
62
|
-
> Note: The file should contain a valid Array of JSON Objects (i.e.
|
62
|
+
> Note: The file should contain a valid Array of JSON Objects (i.e. see [here](https://github.com/puppetlabs/puppet_litmus/blob/main/docs/custom_matrix.json)), otherwise it will throw an error.
|
63
63
|
|
64
64
|
## Documentation
|
65
65
|
|
data/exe/matrix_from_metadata_v2
CHANGED
@@ -28,7 +28,6 @@ IMAGE_TABLE = {
|
|
28
28
|
'RedHat-7' => 'rhel-7',
|
29
29
|
'RedHat-8' => 'rhel-8',
|
30
30
|
'RedHat-9' => 'rhel-9',
|
31
|
-
'RedHat-9-arm' => 'rhel-9-arm64',
|
32
31
|
'SLES-12' => 'sles-12',
|
33
32
|
'SLES-15' => 'sles-15',
|
34
33
|
'Windows-2016' => 'windows-2016',
|
@@ -36,6 +35,10 @@ IMAGE_TABLE = {
|
|
36
35
|
'Windows-2022' => 'windows-2022'
|
37
36
|
}.freeze
|
38
37
|
|
38
|
+
ARM_IMAGE_TABLE = {
|
39
|
+
'RedHat-9-arm' => 'rhel-9-arm64'
|
40
|
+
}.freeze
|
41
|
+
|
39
42
|
DOCKER_PLATFORMS = {
|
40
43
|
'CentOS-6' => 'litmusimage/centos:6',
|
41
44
|
'CentOS-7' => 'litmusimage/centos:7',
|
@@ -112,7 +115,6 @@ if ARGV.include?('--provision-service')
|
|
112
115
|
'Ubuntu-20.04' => 'ubuntu-2004-lts',
|
113
116
|
'Ubuntu-22.04' => 'ubuntu-2204-lts'
|
114
117
|
}
|
115
|
-
|
116
118
|
updated_list = IMAGE_TABLE.dup.clone
|
117
119
|
updated_list.merge!(updated_platforms)
|
118
120
|
|
@@ -152,7 +154,14 @@ else
|
|
152
154
|
os = sup['operatingsystem']
|
153
155
|
sup['operatingsystemrelease'].sort_by(&:to_i).each do |ver|
|
154
156
|
image_key = "#{os}-#{ver}"
|
155
|
-
|
157
|
+
# Add ARM images if they exist and are not excluded
|
158
|
+
if ARM_IMAGE_TABLE.key?("#{image_key}-arm") && !exclude_list.include?("#{image_key.downcase}-arm")
|
159
|
+
matrix[:platforms] << {
|
160
|
+
label: "#{image_key}-arm",
|
161
|
+
provider: 'provision_service',
|
162
|
+
image: ARM_IMAGE_TABLE["#{image_key}-arm"]
|
163
|
+
}
|
164
|
+
end
|
156
165
|
if IMAGE_TABLE.key?(image_key) && !exclude_list.include?(image_key.downcase)
|
157
166
|
matrix[:platforms] << {
|
158
167
|
label: image_key,
|
data/spec/exe/fake_metadata.json
CHANGED
@@ -16,7 +16,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
16
16
|
expect(result.status_code).to eq 0
|
17
17
|
end
|
18
18
|
|
19
|
-
it 'generates the matrix' do
|
19
|
+
it 'generates the matrix' do # rubocop:disable RSpec/ExampleLength
|
20
20
|
expect(result.stdout).to include('::warning::Cannot find image for Ubuntu-14.04')
|
21
21
|
expect(github_output_content).to include(
|
22
22
|
[
|
@@ -24,6 +24,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
24
24
|
'"platforms":[',
|
25
25
|
'{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"},',
|
26
26
|
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
|
27
|
+
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
|
27
28
|
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
|
28
29
|
'{"label":"Ubuntu-18.04","provider":"docker","image":"litmusimage/ubuntu:18.04"}',
|
29
30
|
'],',
|
@@ -36,7 +37,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
36
37
|
expect(github_output_content).to include(
|
37
38
|
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
38
39
|
)
|
39
|
-
expect(result.stdout).to include("Created matrix with
|
40
|
+
expect(result.stdout).to include("Created matrix with 12 cells:\n - Acceptance Test Cells: 10\n - Spec Test Cells: 2")
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
@@ -53,7 +54,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
53
54
|
expect(result.status_code).to eq 0
|
54
55
|
end
|
55
56
|
|
56
|
-
it 'generates the matrix without excluded platforms' do
|
57
|
+
it 'generates the matrix without excluded platforms' do # rubocop:disable RSpec/ExampleLength
|
57
58
|
expect(result.stdout).to include('::warning::Cannot find image for Ubuntu-14.04')
|
58
59
|
expect(result.stdout).to include('::warning::Ubuntu-18.04 was excluded from testing')
|
59
60
|
expect(github_output_content).to include(
|
@@ -62,6 +63,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
62
63
|
'"platforms":[',
|
63
64
|
'{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"},',
|
64
65
|
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
|
66
|
+
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
|
65
67
|
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"}',
|
66
68
|
'],',
|
67
69
|
'"collection":[',
|
@@ -73,7 +75,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
73
75
|
expect(github_output_content).to include(
|
74
76
|
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
75
77
|
)
|
76
|
-
expect(result.stdout).to include("Created matrix with
|
78
|
+
expect(result.stdout).to include("Created matrix with 10 cells:\n - Acceptance Test Cells: 8\n - Spec Test Cells: 2")
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
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: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10
|
11
|
+
date: 2023-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bolt
|