Skip to content

Commit

Permalink
Debian 11 & chef 18 compatibility (#474)
Browse files Browse the repository at this point in the history
* Debian 11 & chef 18 compatibility

* Fix CI

Signed-off-by: Lance Albertson <[email protected]>

* Exclude breaking source builds

Documented this in #475

Signed-off-by: Lance Albertson <[email protected]>

---------

Signed-off-by: Lance Albertson <[email protected]>
Co-authored-by: Lance Albertson <[email protected]>
  • Loading branch information
rottenbytes and ramereth authored Feb 9, 2023
1 parent 3116251 commit 65b1896
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 21 deletions.
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

0 comments on commit 65b1896

Please sign in to comment.