Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
name: "spec (ruby ${{ matrix.ruby_version }})"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
name: "spec (ruby ${{ matrix.ruby_version }})"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AllCops:
- vendor/bundle/**/*
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: '2.7'
TargetRubyVersion: '3.1'

# Disabled
Style/ClassAndModuleChildren:
Expand Down
6 changes: 1 addition & 5 deletions exe/matrix.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"collections": [
{
"puppet": 7.24,
"ruby": 2.7
},
{
"puppet": 8.0,
"ruby": 3.2
Expand Down Expand Up @@ -90,7 +86,7 @@
},
"github_runner": {
"docker": {
"^(AmazonLinux-2|(CentOS|OracleLinux|Scientific)-7|Ubuntu-18|Debian-10)": "ubuntu-20.04"
"^(AmazonLinux-2|(CentOS|OracleLinux|Scientific)-7|Ubuntu-18|Debian-10)": "ubuntu-22.04"
}
}
}
8 changes: 4 additions & 4 deletions exe/matrix_from_metadata_v3
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ options[:metadata]['operatingsystem_support'].each do |os_sup|
end

os_ver_platforms << {
label: label,
label:,
provider: provisioner,
arch: arch,
image: image,
arch:,
image:,
runner: runner.nil? ? options[:runner] : runner
}
end
Expand All @@ -330,7 +330,7 @@ Action.group('matrix', matrix, pretty: true).group('spec_matrix', spec_matrix, p
Action.error('no supported puppet versions') if matrix[:collection].empty?

if Action.type == 'stdout'
$stdout.puts JSON.generate({ matrix: matrix, spec_matrix: spec_matrix })
$stdout.puts JSON.generate({ matrix:, spec_matrix: })
else
Action.set_output('matrix', matrix).set_output('spec_matrix', spec_matrix)
end
6 changes: 3 additions & 3 deletions lib/puppet_litmus/puppet_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module PuppetLitmus::PuppetHelpers
# @return [Boolean] The result of the 2 apply manifests.
def idempotent_apply(manifest, opts = {})
manifest_file_location = create_manifest_file(manifest)
apply_manifest(nil, **opts, catch_failures: true, manifest_file_location: manifest_file_location)
apply_manifest(nil, **opts, catch_changes: true, manifest_file_location: manifest_file_location)
apply_manifest(nil, **opts, catch_failures: true, manifest_file_location:)
apply_manifest(nil, **opts, catch_changes: true, manifest_file_location:)
end

# Applies a manifest. returning the result of that apply. Mimics the apply_manifest from beaker
Expand Down Expand Up @@ -230,7 +230,7 @@ def bolt_upload_file(source, destination, opts = {}, options = {})
target_node_name = search_for_target(target_option, inventory_hash)
end

bolt_result = upload_file(source, destination, target_node_name, options: options, config: nil, inventory: inventory_hash)
bolt_result = upload_file(source, destination, target_node_name, options:, config: nil, inventory: inventory_hash)

result_obj = {
exit_code: 0,
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet_litmus/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def self.configure!
endpoint.path = '/wsman'

opts = {
user: user,
user:,
password: pass,
endpoint: endpoint,
endpoint:,
operation_timeout: 300
}

Expand Down
2 changes: 1 addition & 1 deletion puppet_litmus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
Providing a simple command line tool for puppet content creators, to enable simple and complex test deployments.
EOF
spec.summary = 'Providing a simple command line tool for puppet content creators, to enable simple and complex test deployments.'
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
spec.add_runtime_dependency 'bolt', '~> 4.0'
spec.add_runtime_dependency 'docker-api', '>= 1.34', '< 3.0.0'
spec.add_runtime_dependency 'parallel'
Expand Down
52 changes: 26 additions & 26 deletions spec/exe/matrix_from_metadata_v3_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
matrix = [
'matrix={',
'"platforms":[',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-20.04"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-22.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-22.04"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"}',
'],',
'"collection":[',
'"puppet7-nightly","puppet8-nightly"',
'"puppet8-nightly"',
']',
'}'
].join
Expand All @@ -41,7 +41,7 @@
'::group::spec_matrix'
)
expect(github_output_content).to include(matrix)
expect(github_output_content).to include('spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}')
expect(github_output_content).to include('spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}')
end
end

Expand All @@ -53,17 +53,17 @@
[
'matrix={',
'"platforms":[',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-22.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-22.04"},',
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-20.04"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
'],',
'"collection":[',
'"puppet7-nightly","puppet8-nightly"',
'"puppet8-nightly"',
']',
'}'
].join
Expand All @@ -82,7 +82,7 @@
)
expect(github_output_content).to include(matrix)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
end
end
Expand All @@ -93,17 +93,17 @@
[
'matrix={',
'"platforms":[',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-22.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-22.04"},',
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-20.04"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
'],',
'"collection":[',
'"puppet7-nightly","puppet8-nightly"',
'"puppet8-nightly"',
']',
'}'
].join
Expand All @@ -122,7 +122,7 @@
)
expect(github_output_content).to include(matrix)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
end
end
Expand All @@ -133,16 +133,16 @@
[
'matrix={',
'"platforms":[',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-22.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-22.04"},',
'{"label":"RedHat-8","provider":"provision_service","arch":"x86_64","image":"rhel-8","runner":"ubuntu-latest"},',
'{"label":"RedHat-9","provider":"provision_service","arch":"x86_64","image":"rhel-9","runner":"ubuntu-latest"},',
'{"label":"RedHat-9-arm","provider":"provision_service","arch":"arm","image":"rhel-9-arm64","runner":"ubuntu-latest"},',
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"},',
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
'],',
'"collection":[',
'"puppet7-nightly","puppet8-nightly"',
'"puppet8-nightly"',
']',
'}'
].join
Expand All @@ -162,7 +162,7 @@
)
expect(github_output_content).to include(matrix)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
end
end
Expand All @@ -175,7 +175,7 @@
'"platforms":[',
'],',
'"collection":[',
'"puppet7-nightly","puppet8-nightly"',
'"puppet8-nightly"',
']',
'}'
].join
Expand All @@ -198,7 +198,7 @@
)
expect(github_output_content).to include(matrix)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
end
end
Expand All @@ -209,13 +209,13 @@
[
'matrix={',
'"platforms":[',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-20.04"},',
'{"label":"AmazonLinux-2","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2","runner":"ubuntu-22.04"},',
'{"label":"AmazonLinux-2023","provider":"docker","arch":"x86_64","image":"litmusimage/amazonlinux:2023","runner":"ubuntu-20.04"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-20.04"},',
'{"label":"Ubuntu-18.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:18.04","runner":"ubuntu-22.04"},',
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"}',
'],',
'"collection":[',
'"puppet7-nightly","puppet8-nightly"',
'"puppet8-nightly"',
']',
'}'
].join
Expand All @@ -233,10 +233,10 @@
'::group::spec_matrix'
)
expect(github_output_content).to include(
'"collection":["2023.8.0-puppet_enterprise","2021.7.9-puppet_enterprise","puppet7-nightly","puppet8-nightly"'
'"collection":["2023.8.0-puppet_enterprise","2021.7.9-puppet_enterprise","puppet8-nightly"'
)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
end
end
Expand Down