Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add amazonlinux litmus images to matrix #560

Merged
merged 1 commit into from
May 1, 2024
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
2 changes: 2 additions & 0 deletions exe/matrix_from_metadata_v2
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ ARM_IMAGE_TABLE = {
}.freeze

DOCKER_PLATFORMS = {
'AmazonLinux-2' => 'litmusimage/amazonlinux:2',
'AmazonLinux-2023' => 'litmusimage/amazonlinux:2023',
'CentOS-7' => 'litmusimage/centos:7',
'CentOS-8' => 'litmusimage/centos:stream8', # Support officaly moved to Stream8, metadata is being left as is
'Rocky-8' => 'litmusimage/rockylinux:8',
Expand Down
7 changes: 7 additions & 0 deletions spec/exe/fake_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
}
],
"operatingsystem_support": [
{
"operatingsystem": "AmazonLinux",
"operatingsystemrelease": [
"2",
"2023"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
Expand Down
10 changes: 7 additions & 3 deletions spec/exe/matrix_from_metadata_v2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
[
'matrix={',
'"platforms":[',
'{"label":"AmazonLinux-2","provider":"docker","image":"litmusimage/amazonlinux:2"},',
'{"label":"AmazonLinux-2023","provider":"docker","image":"litmusimage/amazonlinux:2023"},',
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
Expand All @@ -39,7 +41,7 @@
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(result.stdout).to include("Created matrix with 14 cells:\n - Acceptance Test Cells: 12\n - Spec Test Cells: 2")
expect(result.stdout).to include("Created matrix with 18 cells:\n - Acceptance Test Cells: 16\n - Spec Test Cells: 2")
end
end

Expand All @@ -64,6 +66,8 @@
[
'matrix={',
'"platforms":[',
'{"label":"AmazonLinux-2","provider":"docker","image":"litmusimage/amazonlinux:2"},',
'{"label":"AmazonLinux-2023","provider":"docker","image":"litmusimage/amazonlinux:2023"},',
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
Expand All @@ -79,14 +83,14 @@
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(result.stdout).to include("Created matrix with 12 cells:\n - Acceptance Test Cells: 10\n - Spec Test Cells: 2")
expect(result.stdout).to include("Created matrix with 16 cells:\n - Acceptance Test Cells: 14\n - Spec Test Cells: 2")
end
end

context 'with --exclude-platforms \'["ubuntu-18.04","redhat-8"]\'' do
let(:github_output) { Tempfile.new('github_output') }
let(:github_output_content) { github_output.read }
let(:result) { run_matrix_from_metadata_v2({ '--exclude-platforms' => ['ubuntu-18.04', 'ubuntu-22.04', 'redhat-8', 'redhat-9'] }) }
let(:result) { run_matrix_from_metadata_v2({ '--exclude-platforms' => ['amazonlinux-2', 'amazonlinux-2023', 'ubuntu-18.04', 'ubuntu-22.04', 'redhat-8', 'redhat-9'] }) }

before do
ENV['GITHUB_OUTPUT'] = github_output.path
Expand Down
Loading