From 97cde346aba05513f7a4617c652c0adcc64d689e Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 9 Feb 2023 10:01:52 +0100 Subject: [PATCH 1/3] Debian 11 & chef 18 compatibility --- kitchen.dokken.yml | 7 +++++++ resources/install.rb | 3 +++ 2 files changed, 10 insertions(+) diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 4bd141ce..a366f9f7 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -25,6 +25,13 @@ platforms: intermediate_instructions: - RUN /usr/bin/apt-get update + - name: debian-11 + driver: + image: dokken/debian-11 + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update + - name: centos-7 driver: image: dokken/centos-7 diff --git a/resources/install.rb b/resources/install.rb index bf8d226c..f28c13d3 100644 --- a/resources/install.rb +++ b/resources/install.rb @@ -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 From 855b43ad1703dcb774e8037e491f82f303cc444c Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Thu, 9 Feb 2023 08:32:25 -0800 Subject: [PATCH 2/3] Fix CI Signed-off-by: Lance Albertson --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++-------- CHANGELOG.md | 5 ++++- kitchen.dokken.yml | 15 ++------------ kitchen.yml | 3 ++- 4 files changed, 42 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4195136c..297c8a39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,7 @@ jobs: - "debian-9" - "debian-10" - "ubuntu-2004" - - "ubuntu-2104" - - "amazonlinux-2" + - "ubuntu-2204" - "centos-7" - "centos-8" - "centos-stream-8" @@ -40,19 +39,46 @@ jobs: - "source-default" - "source-openssl" exclude: - - os: 'amazonlinux-2' - suite: 'source-openssl' - os: 'fedora-latest' suite: 'source-18' - os: 'fedora-latest' suite: 'source-openssl' - - os: 'ubuntu-2104' + - os: 'ubuntu-2204' suite: 'source-18' 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 + 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@v3 - name: Install Chef uses: actionshub/chef-install@main - name: Dokken @@ -77,7 +103,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 @@ -115,7 +141,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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 47af7a29..09fb6dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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* diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index a366f9f7..aff95826 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -15,27 +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 - intermediate_instructions: - - RUN /usr/bin/apt-get update - name: centos-7 driver: image: dokken/centos-7 - platform: rhel pid_one_command: /usr/lib/systemd/systemd - name: centos-8 @@ -57,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: diff --git a/kitchen.yml b/kitchen.yml index 44483b3e..82e3db5a 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -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: From 0f96b1cf8b4ede798b4d28f4b0af1c7e27636e77 Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Thu, 9 Feb 2023 09:21:44 -0800 Subject: [PATCH 3/3] Exclude breaking source builds Documented this in https://github.com/sous-chefs/haproxy/issues/475 Signed-off-by: Lance Albertson --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 297c8a39..96f795d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,12 +39,29 @@ jobs: - "source-default" - "source-openssl" exclude: + # 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-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: