puppet_litmus 1.1.3 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8481f68695821e0c43b5f940fc3d3923a591d9eea517b584c68ac89a4a2d8705
4
- data.tar.gz: cc2c8065859e96290760d4320d701dc8cfb367041360b5287eda12a9fdf9eb45
3
+ metadata.gz: 9a4006c91797391428323571b4c840992e4fe81bb7748515f30c89c6d9a93946
4
+ data.tar.gz: 6cd46dab531454bb491eaa2c603f9ba5a7208e88b320c660e6073e934ec95913
5
5
  SHA512:
6
- metadata.gz: 9aefe6ab00559d2a6726626e4d2d3819025565c152624c0c42e88c1a2c323c1b025540fbca5bd64a110b7947682f5fe173ea6788425be6c5512e7653ef6eeee0
7
- data.tar.gz: 11f0c2f06e8be551a2c7efdd262256fa3f90fb5942576c2665d4064a23357a1a20081baa81983fcdd1e39832a1c7a0f3e84a999bf35c12386cf26ebbe9c31201
6
+ metadata.gz: bc20c8b1c7a1195dccb8681849b94bf9fd207ce5dca5851927f0a0b34b78e2b74aba75ddd6d9ffef7aa1a0136b535d999d1999db5beb426ef3eaa5f1c1428e10
7
+ data.tar.gz: eb6ecbe6739466e9c243fe5c58ed16dbeb96a33c4d6c7e7638d8cdfddb261070d695f562bad4169ebd9cf296e696ce04f70c40728fd10ceb31d17a1d3289c1be
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Litmus
2
2
 
3
+ [![Code Owners](https://img.shields.io/badge/owners-DevX--team-blue)](https://github.com/puppetlabs/puppet_litmus/blob/main/CODEOWNERS)
4
+ ![ci](https://github.com/puppetlabs/puppet_litmus/actions/workflows/ci.yml/badge.svg)
5
+ [![Gem Version](https://badge.fury.io/rb/puppet_litmus.svg)](https://badge.fury.io/rb/puppet_litmus)
6
+
3
7
  <div name="logo">
4
8
  <img src="resources/litmus-dark-RGB.png"
5
9
  style="display: block; margin-left: auto; margin-right: auto;"
@@ -55,12 +59,16 @@ In order to use this new functionality, run:
55
59
 
56
60
  `$: bundle exec matrix_from_metadata_v2 --custom-matrix matrix.json`
57
61
 
58
- > Note: The file should contain a valid Array of JSON Objects (i.e. `[{"label":"AlmaLinux-8","provider":"provision_service","image":"almalinux-cloud/almalinux-8"}, {..}]`), otherwise it will throw an error.
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.
59
63
 
60
64
  ## Documentation
61
65
 
62
66
  For documentation, see our [Litmus Docs Site](https://puppetlabs.github.io/content-and-tooling-team/docs/litmus/).
63
67
 
68
+ ## License
69
+
70
+ This codebase is licensed under Apache 2.0. However, the open source dependencies included in this codebase might be subject to other software licenses such as AGPL, GPL2.0, and MIT.
71
+
64
72
  ## Other Resources
65
73
 
66
74
  - [Is it Worth the Time?](https://xkcd.com/1205/)
@@ -27,6 +27,8 @@ end
27
27
  IMAGE_TABLE = {
28
28
  'RedHat-7' => 'rhel-7',
29
29
  'RedHat-8' => 'rhel-8',
30
+ 'RedHat-9' => 'rhel-9',
31
+ 'RedHat-9-arm' => 'rhel-9-arm64',
30
32
  'SLES-12' => 'sles-12',
31
33
  'SLES-15' => 'sles-15',
32
34
  'Windows-2012 R2' => 'windows-2012-r2-core',
@@ -35,6 +35,10 @@ IMAGE_TABLE = {
35
35
  'Windows-2022' => 'windows-2022'
36
36
  }.freeze
37
37
 
38
+ ARM_IMAGE_TABLE = {
39
+ 'RedHat-9-arm' => 'rhel-9-arm64'
40
+ }.freeze
41
+
38
42
  DOCKER_PLATFORMS = {
39
43
  'CentOS-6' => 'litmusimage/centos:6',
40
44
  'CentOS-7' => 'litmusimage/centos:7',
@@ -45,6 +49,7 @@ DOCKER_PLATFORMS = {
45
49
  'Debian-9' => 'litmusimage/debian:9',
46
50
  'Debian-10' => 'litmusimage/debian:10',
47
51
  'Debian-11' => 'litmusimage/debian:11',
52
+ 'Debian-12' => 'litmusimage/debian:12',
48
53
  'OracleLinux-6' => 'litmusimage/oraclelinux:6',
49
54
  'OracleLinux-7' => 'litmusimage/oraclelinux:7',
50
55
  'Scientific-6' => 'litmusimage/scientificlinux:6',
@@ -110,7 +115,6 @@ if ARGV.include?('--provision-service')
110
115
  'Ubuntu-20.04' => 'ubuntu-2004-lts',
111
116
  'Ubuntu-22.04' => 'ubuntu-2204-lts'
112
117
  }
113
-
114
118
  updated_list = IMAGE_TABLE.dup.clone
115
119
  updated_list.merge!(updated_platforms)
116
120
 
@@ -150,7 +154,14 @@ else
150
154
  os = sup['operatingsystem']
151
155
  sup['operatingsystemrelease'].sort_by(&:to_i).each do |ver|
152
156
  image_key = "#{os}-#{ver}"
153
-
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
154
165
  if IMAGE_TABLE.key?(image_key) && !exclude_list.include?(image_key.downcase)
155
166
  matrix[:platforms] << {
156
167
  label: image_key,
@@ -2,5 +2,5 @@
2
2
 
3
3
  # version of this gem
4
4
  module PuppetLitmus
5
- VERSION = '1.1.3'
5
+ VERSION = '1.2.1'
6
6
  end
@@ -23,7 +23,8 @@
23
23
  {
24
24
  "operatingsystem": "RedHat",
25
25
  "operatingsystemrelease": [
26
- "8"
26
+ "8",
27
+ "9"
27
28
  ]
28
29
  },
29
30
  {
@@ -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,8 @@ 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"},',
28
+ '{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
27
29
  '{"label":"Ubuntu-18.04","provider":"docker","image":"litmusimage/ubuntu:18.04"}',
28
30
  '],',
29
31
  '"collection":[',
@@ -35,7 +37,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
35
37
  expect(github_output_content).to include(
36
38
  'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
37
39
  )
38
- expect(result.stdout).to include("Created matrix with 8 cells:\n - Acceptance Test Cells: 6\n - Spec Test Cells: 2")
40
+ expect(result.stdout).to include("Created matrix with 12 cells:\n - Acceptance Test Cells: 10\n - Spec Test Cells: 2")
39
41
  end
40
42
  end
41
43
 
@@ -52,7 +54,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
52
54
  expect(result.status_code).to eq 0
53
55
  end
54
56
 
55
- it 'generates the matrix without excluded platforms' do
57
+ it 'generates the matrix without excluded platforms' do # rubocop:disable RSpec/ExampleLength
56
58
  expect(result.stdout).to include('::warning::Cannot find image for Ubuntu-14.04')
57
59
  expect(result.stdout).to include('::warning::Ubuntu-18.04 was excluded from testing')
58
60
  expect(github_output_content).to include(
@@ -60,7 +62,9 @@ RSpec.describe 'matrix_from_metadata_v2' do
60
62
  'matrix={',
61
63
  '"platforms":[',
62
64
  '{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"},',
63
- '{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"}',
65
+ '{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
66
+ '{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
67
+ '{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"}',
64
68
  '],',
65
69
  '"collection":[',
66
70
  '"puppet7-nightly","puppet8-nightly"',
@@ -71,14 +75,14 @@ RSpec.describe 'matrix_from_metadata_v2' do
71
75
  expect(github_output_content).to include(
72
76
  'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
73
77
  )
74
- expect(result.stdout).to include("Created matrix with 6 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 2")
78
+ expect(result.stdout).to include("Created matrix with 10 cells:\n - Acceptance Test Cells: 8\n - Spec Test Cells: 2")
75
79
  end
76
80
  end
77
81
 
78
82
  context 'with --exclude-platforms \'["ubuntu-18.04","redhat-8"]\'' do
79
83
  let(:github_output) { Tempfile.new('github_output') }
80
84
  let(:github_output_content) { github_output.read }
81
- let(:result) { run_matrix_from_metadata_v2({ '--exclude-platforms' => ['ubuntu-18.04', 'redhat-8'] }) }
85
+ let(:result) { run_matrix_from_metadata_v2({ '--exclude-platforms' => ['ubuntu-18.04', 'redhat-8', 'redhat-9'] }) }
82
86
 
83
87
  before do
84
88
  ENV['GITHUB_OUTPUT'] = github_output.path
@@ -96,7 +100,8 @@ RSpec.describe 'matrix_from_metadata_v2' do
96
100
  [
97
101
  'matrix={',
98
102
  '"platforms":[',
99
- '{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"}',
103
+ '{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"},',
104
+ '{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"}',
100
105
  '],',
101
106
  '"collection":[',
102
107
  '"puppet7-nightly","puppet8-nightly"',
@@ -107,7 +112,7 @@ RSpec.describe 'matrix_from_metadata_v2' do
107
112
  expect(github_output_content).to include(
108
113
  'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
109
114
  )
110
- expect(result.stdout).to include("Created matrix with 4 cells:\n - Acceptance Test Cells: 2\n - Spec Test Cells: 2")
115
+ expect(result.stdout).to include("Created matrix with 6 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 2")
111
116
  end
112
117
  end
113
118
  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: 1.1.3
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-07-31 00:00:00.000000000 Z
11
+ date: 2023-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bolt