Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- centos-stream-9
- centos-stream-10
- debian-12
- rockylinux-8
- rockylinux-9
- rockylinux-10
- ubuntu-2204
- ubuntu-2404
suite:
Expand Down Expand Up @@ -105,6 +108,8 @@ jobs:
- "almalinux-8"
- "almalinux-9"
- "debian-12"
- "rockylinux-8"
- "rockylinux-9"
- "ubuntu-2004"
- "ubuntu-2204"
- "ubuntu-2404"
Expand Down
2 changes: 2 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .mdlrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rules "~MD013", "~MD024", "~MD025"
rules "~MD004", "~MD012", "~MD013", "~MD024", "~MD025"
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
supports 'fedora'
supports 'redhat'
supports 'ubuntu'
supports 'rocky'
supports 'almalinux'

gem 'docker-api', '>= 2.3', '< 3'
3 changes: 3 additions & 0 deletions resources/installation_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
68 changes: 68 additions & 0 deletions spec/docker_test/installation_package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading