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

Debian 11 & chef 18 compatibility #474

Merged
merged 3 commits into from
Feb 9, 2023
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
59 changes: 51 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
- "debian-9"
- "debian-10"
- "ubuntu-2004"
- "ubuntu-2104"
- "amazonlinux-2"
- "ubuntu-2204"
- "centos-7"
- "centos-8"
- "centos-stream-8"
Expand All @@ -40,19 +39,63 @@ jobs:
- "source-default"
- "source-openssl"
exclude:
- os: 'amazonlinux-2'
suite: 'source-openssl'
# Excluded due to https://github.com/sous-chefs/haproxy/issues/475
- os: 'fedora-latest'
suite: 'source-18'
- os: 'fedora-latest'
suite: 'source-20'
- os: 'fedora-latest'
suite: 'source-22'
- os: 'fedora-latest'
suite: 'source-default'
- os: 'fedora-latest'
suite: 'source-openssl'
- os: 'ubuntu-2104'
- os: 'ubuntu-2204'
suite: 'source-18'
- os: 'ubuntu-2204'
suite: 'source-20'
- os: 'ubuntu-2204'
suite: 'source-22'
- os: 'ubuntu-2204'
suite: 'source-24'
- os: 'ubuntu-2204'
suite: 'source-default'
- os: 'ubuntu-2204'
suite: 'source-openssl'
fail-fast: false

steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Chef
uses: actionshub/chef-install@main
- name: Dokken
uses: actionshub/test-kitchen@main
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}

integration-amazonlinux:
needs: lint-unit
runs-on: ubuntu-20.04
strategy:
matrix:
os:
- "amazonlinux-2"
suite:
- "package"
- "source-18"
- "source-20"
- "source-22"
- "source-default"
fail-fast: false

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Chef
uses: actionshub/chef-install@main
- name: Dokken
Expand All @@ -77,7 +120,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Chef
uses: actionshub/chef-install@main
- name: Dokken
Expand Down Expand Up @@ -115,7 +158,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Chef
uses: actionshub/chef-install@main
- name: Dokken
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ This file is used to list changes made in each version of the haproxy cookbook.

## Unreleased

- Debian 11 & Chef 18 compatibility
- Fix CI

## 12.2.4 - *2022-12-06*

Standardise files with files in sous-chefs/repo-management
- Standardise files with files in sous-chefs/repo-management

## 12.2.3 - *2022-04-21*

Expand Down
18 changes: 7 additions & 11 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ platforms:
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: debian-11
driver:
image: dokken/debian-11
pid_one_command: /bin/systemd

- name: centos-7
driver:
image: dokken/centos-7
platform: rhel
pid_one_command: /usr/lib/systemd/systemd

- name: centos-8
Expand All @@ -50,15 +50,11 @@ platforms:
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: ubuntu-21.04
- name: ubuntu-22.04
driver:
image: dokken/ubuntu-21.04
image: dokken/ubuntu-22.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: amazonlinux-2
driver:
Expand Down
3 changes: 2 additions & 1 deletion kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ platforms:
- name: centos-stream-8
- name: debian-9
- name: debian-10
- name: debian-11
- name: ubuntu-20.04
- name: ubuntu-21.04
- name: ubuntu-22.04
- name: fedora-latest

suites:
Expand Down
3 changes: 3 additions & 0 deletions resources/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ def compile_make_boolean(bool)
user new_resource.user do
home "/home/#{new_resource.user}"
group new_resource.group
expire_date '2050-12-31' if Chef::VERSION.to_f >= 18.0
# rubocop:disable Lint/AmbiguousOperator
inactive -1 if Chef::VERSION.to_f >= 18.0
end
end
end