From 9001ebb9748484cc68431f5187fdb49ab55881fa Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Tue, 31 Oct 2023 14:09:45 +0000 Subject: [PATCH] Update standardfiles (#65) Signed-off-by: Dan Webb --- .markdownlint-cli2.yaml | 3 +- .overcommit.yml | 18 ++++--- .vscode/extensions.json | 3 +- .yamllint | 2 + CHANGELOG.md | 2 + chefignore | 2 +- kitchen.dokken.yml | 109 +++++++++++++++++++++++++++++----------- kitchen.exec.yml | 7 +++ kitchen.global.yml | 38 ++++++++++++++ renovate.json | 15 +++++- 10 files changed, 159 insertions(+), 40 deletions(-) create mode 100644 kitchen.exec.yml create mode 100644 kitchen.global.yml diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index dffb96a..6fa8e77 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -1,4 +1,5 @@ config: ul-indent: false # MD007 line-length: false # MD013 - no-duplicate-heading/no-duplicate-header: false # MD024 + no-duplicate-heading: false # MD024 + reference-links-images: false # MD052 diff --git a/.overcommit.yml b/.overcommit.yml index 1d27ed8..0e89a3c 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -4,17 +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"] - Delivery: - enabled: true - required_executable: 'delivery' - flags: ['local', 'all'] + MarkdownLint: + enabled: false + required_executable: "npx" + command: ["npx", "markdownlint-cli2", "'**/*.md'"] + include: ["**/*.md"] + CommitMsg: HardTabs: enabled: true diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 80fa82b..51d0ae7 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "chef-software.chef", "rebornix.ruby", - "editorconfig.editorconfig" + "editorconfig.editorconfig", + "DavidAnson.vscode-markdownlint" ] } diff --git a/.yamllint b/.yamllint index 1b5cea0..0046b23 100644 --- a/.yamllint +++ b/.yamllint @@ -11,3 +11,5 @@ rules: max-spaces-inside: 1 min-spaces-inside-empty: -1 max-spaces-inside-empty: -1 + comments: + min-spaces-from-content: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index e9958cf..e5f1bca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Standardise files with files in sous-chefs/repo-management + ## 3.0.6 - *2023-03-02* ## 3.0.5 - *2023-03-01* diff --git a/chefignore b/chefignore index cc170ea..a27b0b2 100644 --- a/chefignore +++ b/chefignore @@ -61,7 +61,7 @@ Dangerfile examples/* features/* Guardfile -kitchen.yml* +kitchen*.yml mlc_config.json Procfile Rakefile diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index e067dcd..47eff95 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -1,60 +1,113 @@ ---- driver: name: dokken privileged: true - env: [CHEF_LICENSE=accept] + chef_version: <%= ENV['CHEF_VERSION'] || 'current' %> -transport: - name: dokken - -provisioner: - name: dokken - product_name: chef - product_version: <%= ENV['CHEF_VERSION'] || 'latest' %> - install_strategy: once +transport: { name: dokken } +provisioner: { name: dokken } platforms: + - name: almalinux-8 + driver: + image: dokken/almalinux-8 + pid_one_command: /usr/lib/systemd/systemd + + - name: almalinux-9 + driver: + image: dokken/almalinux-9 + pid_one_command: /usr/lib/systemd/systemd + + - name: amazonlinux-2023 + driver: + 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 - 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: centos-7 + - name: debian-11 driver: - image: dokken/centos-7 - platform: rhel + image: dokken/debian-11 + pid_one_command: /bin/systemd + + - name: debian-12 + driver: + 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-8 + - name: opensuse-leap-15 driver: - image: dokken/centos-8 - platform: rhel + image: dokken/opensuse-leap-15 + pid_one_command: /usr/lib/systemd/systemd + + - name: oraclelinux-7 + driver: + 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 driver: image: dokken/ubuntu-18.04 pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - name: ubuntu-20.04 driver: - image: dokken/ubuntu-16.04 + image: dokken/ubuntu-20.04 pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - - name: amazonlinux-2 + - name: ubuntu-22.04 driver: - image: dokken/amazonlinux-2 - pid_one_command: /usr/lib/systemd/systemd + image: dokken/ubuntu-22.04 + pid_one_command: /bin/systemd + + - name: ubuntu-23.04 + driver: + 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 0000000..ba7b2a9 --- /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 0000000..a382fcd --- /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/renovate.json b/renovate.json index 39a2b6e..7e7a8ba 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,17 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" + "extends": ["config:base"], + "packageRules": [{ + "groupName": "Actions", + "matchUpdateTypes": ["patch", "pin", "digest"], + "automerge": true, + "addLabels": ["Release: Patch", "Skip: Announcements"] + }, + { + "groupName": "Actions", + "matchUpdateTypes": ["major"], + "automerge": false, + "addLabels": ["Release: Patch", "Skip: Announcements"] + } ] }