diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e10849328..05974301c 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -55,11 +55,11 @@ chef exec rspec # Unit tests (ChefSpec) 3. Also update any InSpec tests under test/integration 4. Ensure cookstyle and rspec passes at least. You may run `cookstyle -a` to automatically fix issues if needed. 5. Also always update all documentation found in README.md and any files under documentation/* -6. **Always update CHANGELOG.md** (required by Dangerfile) - Make sure this conforms with the Sous Chefs changelog standards. +6. **Do NOT update CHANGELOG.md** - This cookbook uses release-please for automatic changelog generation ### Pull Request Requirements - **PR description >10 chars** (Danger enforced) -- **CHANGELOG.md entry** for all code changes +- **Do NOT manually update CHANGELOG.md** - release-please handles this automatically - **Version labels** (major/minor/patch) required - **All linters must pass** (cookstyle, yamllint, markdownlint) - **Test updates** needed for code changes >5 lines and parameter changes that affect the code logic diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14b181ca8..64f80edb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,9 @@ jobs: - centos-stream-9 - centos-stream-10 - debian-12 + - rockylinux-8 + - rockylinux-9 + - rockylinux-10 - ubuntu-2204 - ubuntu-2404 suite: @@ -105,6 +108,8 @@ jobs: - "almalinux-8" - "almalinux-9" - "debian-12" + - "rockylinux-8" + - "rockylinux-9" - "ubuntu-2004" - "ubuntu-2204" - "ubuntu-2404" diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index 0196ac7b3..bba8ff8c8 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -1,6 +1,8 @@ config: ul-indent: false # MD007 line-length: false # MD013 + no-multiple-blanks: false # MD012 + ul-style: false # MD004 no-duplicate-heading: false # MD024 reference-links-images: false # MD052 ignores: diff --git a/.mdlrc b/.mdlrc index 9cc2c6322..163eb1dbc 100644 --- a/.mdlrc +++ b/.mdlrc @@ -1 +1 @@ -rules "~MD013", "~MD024", "~MD025" +rules "~MD004", "~MD012", "~MD013", "~MD024", "~MD025" diff --git a/README.md b/README.md index ce921f107..9f92c8c89 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,12 @@ This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of ## Platform Support - Amazon Linux 2 -- Debian 9/10/11 +- Debian 9/10/11/12 - Fedora -- Ubuntu 18.04/20.04/22.04 -- CentOS 7/8 +- Ubuntu 18.04/20.04/22.04/24.04 +- CentOS 7/8/9 +- Rocky Linux 8/9 +- AlmaLinux 8/9 ## Cookbook Dependencies diff --git a/metadata.rb b/metadata.rb index 9c1fa56f8..bc552a5ab 100644 --- a/metadata.rb +++ b/metadata.rb @@ -16,5 +16,7 @@ supports 'fedora' supports 'redhat' supports 'ubuntu' +supports 'rocky' +supports 'almalinux' gem 'docker-api', '>= 2.3', '< 3' diff --git a/resources/installation_package.rb b/resources/installation_package.rb index c8cefffda..94cc85414 100644 --- a/resources/installation_package.rb +++ b/resources/installation_package.rb @@ -142,6 +142,9 @@ def version_string(v) # s390x is only available under rhel platform elsif platform?('redhat', 'oracle') && (arch == 's390x' || !el7?) 'rhel' + # Rocky and AlmaLinux are CentOS successors, use centos repos + elsif platform?('rocky', 'almalinux') + 'centos' # use rhel for all el8 since CentOS 8 is dead elsif el8? && !platform?('centos') 'rhel' diff --git a/spec/docker_test/installation_package_spec.rb b/spec/docker_test/installation_package_spec.rb index a245299af..c5f75f03a 100644 --- a/spec/docker_test/installation_package_spec.rb +++ b/spec/docker_test/installation_package_spec.rb @@ -196,6 +196,74 @@ end end + context 'Rocky Linux 8: testing default action, default properties' do + platform 'rocky', '8' + cached(:subject) { chef_run } + it 'installs docker' do + expect(chef_run).to create_docker_installation_package('default') + end + it do + expect(chef_run).to create_yum_repository('docker').with( + baseurl: 'https://download.docker.com/linux/centos/8/x86_64/stable', + gpgkey: 'https://download.docker.com/linux/centos/gpg', + description: 'Docker Stable repository', + gpgcheck: true, + enabled: true + ) + end + end + + context 'Rocky Linux 9: testing default action, default properties' do + platform 'rocky', '9' + cached(:subject) { chef_run } + it 'installs docker' do + expect(chef_run).to create_docker_installation_package('default') + end + it do + expect(chef_run).to create_yum_repository('docker').with( + baseurl: 'https://download.docker.com/linux/centos/9/x86_64/stable', + gpgkey: 'https://download.docker.com/linux/centos/gpg', + description: 'Docker Stable repository', + gpgcheck: true, + enabled: true + ) + end + end + + context 'AlmaLinux 8: testing default action, default properties' do + platform 'almalinux', '8' + cached(:subject) { chef_run } + it 'installs docker' do + expect(chef_run).to create_docker_installation_package('default') + end + it do + expect(chef_run).to create_yum_repository('docker').with( + baseurl: 'https://download.docker.com/linux/centos/8/x86_64/stable', + gpgkey: 'https://download.docker.com/linux/centos/gpg', + description: 'Docker Stable repository', + gpgcheck: true, + enabled: true + ) + end + end + + context 'AlmaLinux 9: testing default action, default properties' do + platform 'almalinux', '9' + cached(:subject) { chef_run } + it 'installs docker' do + expect(chef_run).to create_docker_installation_package('default') + end + it do + expect(chef_run).to create_yum_repository('docker').with( + baseurl: 'https://download.docker.com/linux/centos/9/x86_64/stable', + gpgkey: 'https://download.docker.com/linux/centos/gpg', + description: 'Docker Stable repository', + gpgcheck: true, + enabled: true + ) + end + end + # Coverage of all recent docker versions # To ensure test coverage and backwards compatibility # With the frequent changes in package naming convention