Skip to content

Commit 70f2fc0

Browse files
committed
(MAINT) Force newer Puppet 7 Gem
After the realease of Puppet 8 there seems to be some confusion with bundler causing it to pull older versions of Puppet 7. This breaks CI. This change forces puppet_maj_version == 7 to pull ~> 7.24.
1 parent 5314169 commit 70f2fc0

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

exe/matrix_from_metadata_v2

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,13 @@ if metadata.key?('requirements') && metadata['requirements'].length.positive?
142142
next unless Gem::Requirement.create(reqs).satisfied_by?(Gem::Version.new("#{collection[:puppet_maj_version]}.9999"))
143143

144144
matrix[:collection] << "puppet#{collection[:puppet_maj_version]}-nightly"
145-
spec_matrix[:include] << if collection[:puppet_maj_version] == 8
146-
{ puppet_version: 'https://github.com/puppetlabs/puppet', ruby_version: collection[:ruby_version] }
147-
else
148-
{ puppet_version: "~> #{collection[:puppet_maj_version]}.0", ruby_version: collection[:ruby_version] }
149-
end
145+
146+
include_version = {
147+
8 => "~> #{collection[:puppet_maj_version]}.0",
148+
7 => "~> #{collection[:puppet_maj_version]}.24",
149+
6 => "~> #{collection[:puppet_maj_version]}.0"
150+
}
151+
spec_matrix[:include] << { puppet_version: include_version[collection[:puppet_maj_version]], ruby_version: collection[:ruby_version] }
150152
end
151153
end
152154
end

spec/exe/matrix_from_metadata_v2_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
].join
3434
)
3535
expect(github_output_content).to include(
36-
'spec_matrix={"include":[{"puppet_version":"~> 7.0","ruby_version":2.7},{"puppet_version":"https://github.com/puppetlabs/puppet","ruby_version":3.2}]}'
36+
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
3737
)
3838
expect(result.stdout).to include("Created matrix with 8 cells:\n - Acceptance Test Cells: 6\n - Spec Test Cells: 2")
3939
end
@@ -69,7 +69,7 @@
6969
].join
7070
)
7171
expect(github_output_content).to include(
72-
'spec_matrix={"include":[{"puppet_version":"~> 7.0","ruby_version":2.7},{"puppet_version":"https://github.com/puppetlabs/puppet","ruby_version":3.2}]}'
72+
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
7373
)
7474
expect(result.stdout).to include("Created matrix with 6 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 2")
7575
end
@@ -105,7 +105,7 @@
105105
].join
106106
)
107107
expect(github_output_content).to include(
108-
'spec_matrix={"include":[{"puppet_version":"~> 7.0","ruby_version":2.7},{"puppet_version":"https://github.com/puppetlabs/puppet","ruby_version":3.2}]}'
108+
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
109109
)
110110
expect(result.stdout).to include("Created matrix with 4 cells:\n - Acceptance Test Cells: 2\n - Spec Test Cells: 2")
111111
end

0 commit comments

Comments
 (0)