From ca4d3fbcb7838263a4ec04c6b8595c2d4e1d1bc1 Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Tue, 4 Apr 2023 12:31:05 +0100 Subject: [PATCH] Update workflows (#697) * Update workflows --- .github/workflows/ci.yml | 2 +- .github/workflows/md-links.yml | 19 ------- .overcommit.yml | 14 ++++-- CHANGELOG.md | 46 +++++++++-------- kitchen.dokken.yml | 90 +++++++++++++++++++++++++--------- kitchen.exec.yml | 7 +++ kitchen.global.yml | 38 ++++++++++++++ metadata.rb | 8 +-- test/cookbooks/test/README.md | 2 +- 9 files changed, 155 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/md-links.yml create mode 100644 kitchen.exec.yml create mode 100644 kitchen.global.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b874112cf..090a1a4eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ name: ci jobs: lint-unit: - uses: sous-chefs/.github/.github/workflows/lint-unit.yml@2.0.1 + uses: sous-chefs/.github/.github/workflows/lint-unit.yml@2.0.2 permissions: actions: write checks: write diff --git a/.github/workflows/md-links.yml b/.github/workflows/md-links.yml deleted file mode 100644 index e5c1e7a21..000000000 --- a/.github/workflows/md-links.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: md-links - -"on": - pull_request: - push: - branches: [main] - -jobs: - md-links: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - - name: markdown-link-check - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 - with: - use-verbose-mode: "yes" - folder-path: "documentation" diff --git a/.overcommit.yml b/.overcommit.yml index cd8682a0c..0e89a3c11 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -4,13 +4,21 @@ PreCommit: enabled: true YamlLint: enabled: true - Rspec: + required_executable: "yamllint" + ChefSpec: enabled: true - required_executable: 'rspec' + required_executable: "chef" + command: ["chef", "exec", "rspec"] Cookstyle: enabled: true - required_executable: 'cookstyle' + required_executable: "cookstyle" command: ["cookstyle"] + MarkdownLint: + enabled: false + required_executable: "npx" + command: ["npx", "markdownlint-cli2", "'**/*.md'"] + include: ["**/*.md"] + CommitMsg: HardTabs: enabled: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b6ff2673..de2611a16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,18 +4,24 @@ All notable changes to this project will be documented in this file. ## Unreleased +Standardise files with files in sous-chefs/repo-management + ## 11.0.12 - *2023-04-01* -## 11.0.11 - *2023-04-01* +Standardise files with files in sous-chefs/repo-management -## 11.0.10 - *2023-04-01* +## 11.0.11 - *2023-04-01* Standardise files with files in sous-chefs/repo-management +## 11.0.10 - *2023-04-01* + Standardise files with files in sous-chefs/repo-management ## 11.0.9 - *2023-03-13* +Standardise files with files in sous-chefs/repo-management + ## 11.0.8 - *2023-02-14* Standardise files with files in sous-chefs/repo-management @@ -631,11 +637,11 @@ Fixing style cops ### Bug -- **[COOK-4068](https://tickets.chef.io/browse/COOK-4068)** - rework MySQL Windows recipe +- [COOK-4068] - rework MySQL Windows recipe ### Improvement -- **[COOK-3801](https://tickets.chef.io/browse/COOK-3801)** - Add innodb_adaptive_flushing_method and innodb_adaptive_checkpoint +- [COOK-3801] - Add innodb_adaptive_flushing_method and innodb_adaptive_checkpoint ## [4.0.10] @@ -678,7 +684,7 @@ Locking yum dependency to '< 3' ### Bug -- **[COOK-3752](https://tickets.chef.io/browse/COOK-3752)** - mysql service fails to start in mysql::server recipe +- [COOK-3752] - mysql service fails to start in mysql::server recipe ## [3.0.10] @@ -688,34 +694,34 @@ Locking yum dependency to '< 3' ### Bug -- **[COOK-3749](https://tickets.chef.io/browse/COOK-3749)** - Fix a regression with Chef 11-specific features +- [COOK-3749] - Fix a regression with Chef 11-specific features ## [3.0.6] ### Bug -- **[COOK-3674](https://tickets.chef.io/browse/COOK-3674)** - Fix an issue where the MySQL server fails to set the root password correctly when `data_dir` is a non-default value -- **[COOK-3647](https://tickets.chef.io/browse/COOK-3647)** - Fix README typo (databas => database) -- **[COOK-3477](https://tickets.chef.io/browse/COOK-3477)** - Fix log-queries-not-using-indexes not working -- **[COOK-3436](https://tickets.chef.io/browse/COOK-3436)** - Pull percona repo in compilation phase -- **[COOK-3208](https://tickets.chef.io/browse/COOK-3208)** - Fix README typo (LitenPort => ListenPort) -- **[COOK-3149](https://tickets.chef.io/browse/COOK-3149)** - Create my.cnf before installing -- **[COOK-2681](https://tickets.chef.io/browse/COOK-2681)** - Fix log_slow_queries for 5.5+ -- **[COOK-2606](https://tickets.chef.io/browse/COOK-2606)** - Use proper bind address on cloud providers +- [COOK-3674] - Fix an issue where the MySQL server fails to set the root password correctly when `data_dir` is a non-default value +- [COOK-3647] - Fix README typo (databas => database) +- [COOK-3477] - Fix log-queries-not-using-indexes not working +- [COOK-3436] - Pull percona repo in compilation phase +- [COOK-3208] - Fix README typo (LitenPort => ListenPort) +- [COOK-3149] - Create my.cnf before installing +- [COOK-2681] - Fix log_slow_queries for 5.5+ +- [COOK-2606] - Use proper bind address on cloud providers ### Improvement -- **[COOK-3498](https://tickets.chef.io/browse/COOK-3498)** - Add support for replicate_* variables in my.cnf +- [COOK-3498] - Add support for replicate_* variables in my.cnf ## [3.0.4] ### Bug -- **[COOK-3310](https://tickets.chef.io/browse/COOK-3310)** - Fix missing `GRANT` option -- **[COOK-3233](https://tickets.chef.io/browse/COOK-3233)** - Fix escaping special characters -- **[COOK-3156](https://tickets.chef.io/browse/COOK-3156)** - Fix GRANTS file when `remote_root_acl` is specified -- **[COOK-3134](https://tickets.chef.io/browse/COOK-3134)** - Fix Chef 11 support -- **[COOK-2318](https://tickets.chef.io/browse/COOK-2318)** - Remove redundant `if` block around `node.mysql.tunable.log_bin` +- [COOK-3310] - Fix missing `GRANT` option +- [COOK-3233] - Fix escaping special characters +- [COOK-3156] - Fix GRANTS file when `remote_root_acl` is specified +- [COOK-3134] - Fix Chef 11 support +- [COOK-2318] - Remove redundant `if` block around `node.mysql.tunable.log_bin` ## [3.0.2] diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 61b258b60..47eff95d8 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -1,16 +1,10 @@ ---- driver: name: dokken - privileged: true # because Docker and SystemD/Upstart + privileged: true chef_version: <%= ENV['CHEF_VERSION'] || 'current' %> - env: [CHEF_LICENSE=accept] -transport: - name: dokken - -provisioner: - name: dokken - deprecations_as_errors: true +transport: { name: dokken } +provisioner: { name: dokken } platforms: - name: almalinux-8 @@ -18,11 +12,36 @@ platforms: image: dokken/almalinux-8 pid_one_command: /usr/lib/systemd/systemd - - name: amazonlinux-2 + - name: almalinux-9 + driver: + image: dokken/almalinux-9 + pid_one_command: /usr/lib/systemd/systemd + + - name: amazonlinux-2023 driver: - image: dokken/amazonlinux-2 + image: dokken/amazonlinux-2023 pid_one_command: /usr/lib/systemd/systemd + - name: centos-7 + driver: + image: dokken/centos-7 + pid_one_command: /usr/lib/systemd/systemd + + - name: centos-stream-8 + driver: + image: dokken/centos-stream-8 + pid_one_command: /usr/lib/systemd/systemd + + - name: centos-stream-9 + driver: + image: dokken/centos-stream-9 + pid_one_command: /usr/lib/systemd/systemd + + - name: debian-9 + driver: + image: dokken/debian-9 + pid_one_command: /bin/systemd + - name: debian-10 driver: image: dokken/debian-10 @@ -33,19 +52,44 @@ platforms: image: dokken/debian-11 pid_one_command: /bin/systemd - - name: centos-7 + - name: debian-12 driver: - image: dokken/centos-7 + image: dokken/debian-12 + pid_one_command: /bin/systemd + + - name: fedora-latest + driver: + image: dokken/fedora-latest pid_one_command: /usr/lib/systemd/systemd - - name: centos-stream-8 + - name: opensuse-leap-15 driver: - image: dokken/centos-stream-8 + image: dokken/opensuse-leap-15 pid_one_command: /usr/lib/systemd/systemd - - name: fedora-latest + - name: oraclelinux-7 driver: - image: dokken/fedora-latest + image: dokken/oraclelinux-7 + pid_one_command: /usr/lib/systemd/systemd + + - name: oraclelinux-8 + driver: + image: dokken/oraclelinux-8 + pid_one_command: /usr/lib/systemd/systemd + + - name: oraclelinux-9 + driver: + image: dokken/oraclelinux-9 + pid_one_command: /usr/lib/systemd/systemd + + - name: rockylinux-8 + driver: + image: dokken/rockylinux-8 + pid_one_command: /usr/lib/systemd/systemd + + - name: rockylinux-9 + driver: + image: dokken/rockylinux-9 pid_one_command: /usr/lib/systemd/systemd - name: ubuntu-18.04 @@ -58,12 +102,12 @@ platforms: image: dokken/ubuntu-20.04 pid_one_command: /bin/systemd - - name: opensuse-leap-15 + - name: ubuntu-22.04 driver: - image: dokken/opensuse-leap-15 - pid_one_command: /usr/lib/systemd/systemd + image: dokken/ubuntu-22.04 + pid_one_command: /bin/systemd - - name: rockylinux-8 + - name: ubuntu-23.04 driver: - image: dokken/rockylinux-8 - pid_one_command: /usr/lib/systemd/systemd + image: dokken/ubuntu-23.04 + pid_one_command: /bin/systemd diff --git a/kitchen.exec.yml b/kitchen.exec.yml new file mode 100644 index 000000000..ba7b2a962 --- /dev/null +++ b/kitchen.exec.yml @@ -0,0 +1,7 @@ +--- +driver: { name: exec } +transport: { name: exec } + +platforms: + - name: macos-latest + - name: windows-latest diff --git a/kitchen.global.yml b/kitchen.global.yml new file mode 100644 index 000000000..a382fcd0d --- /dev/null +++ b/kitchen.global.yml @@ -0,0 +1,38 @@ +--- +provisioner: + name: chef_infra + product_name: chef + product_version: <%= ENV['CHEF_VERSION'] || 'latest' %> + channel: stable + install_strategy: once + chef_license: accept + enforce_idempotency: <%= ENV['ENFORCE_IDEMPOTENCY'] || true %> + multiple_converge: <%= ENV['MULTIPLE_CONVERGE'] || 2 %> + deprecations_as_errors: true + log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %> + +verifier: + name: inspec + +platforms: + - name: almalinux-8 + - name: almalinux-9 + - name: amazonlinux-2023 + - name: centos-7 + - name: centos-stream-8 + - name: centos-stream-9 + - name: debian-9 + - name: debian-10 + - name: debian-11 + - name: debian-12 + - name: fedora-latest + - name: opensuse-leap-15 + - name: oraclelinux-7 + - name: oraclelinux-8 + - name: oraclelinux-9 + - name: rockylinux-8 + - name: rockylinux-9 + - name: ubuntu-18.04 + - name: ubuntu-20.04 + - name: ubuntu-22.04 + - name: ubuntu-23.04 diff --git a/metadata.rb b/metadata.rb index 6e39f140a..6dd708f92 100644 --- a/metadata.rb +++ b/metadata.rb @@ -10,10 +10,10 @@ depends 'apparmor' -%w(redhat centos scientific oracle).each do |el| - supports el, '>= 7.0' -end - +suppots 'redhat', '>= 7.0' +supports 'centos', '>= 7.0' +supports 'scientific', '>= 7.0' +supports 'oracle', '>= 7.0' supports 'amazon' supports 'fedora' supports 'debian', '>= 9.0' diff --git a/test/cookbooks/test/README.md b/test/cookbooks/test/README.md index b07f0ed95..5080e6b8b 100644 --- a/test/cookbooks/test/README.md +++ b/test/cookbooks/test/README.md @@ -1 +1 @@ -This is a README +# This is a README