From 6f9ae3d6bb8aeb823ba321030b5f2fcc3abdf215 Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Wed, 1 Nov 2023 10:36:53 +0000 Subject: [PATCH 1/2] Update standard files Signed-off-by: Dan Webb --- .editorconfig | 19 ++++++++ .envrc | 1 + .gitattributes | 6 --- .gitignore | 52 ++++++++++++++++++-- .overcommit.yml | 24 ++++++++++ .yamllint | 15 ++++++ CONTRIBUTING.md | 4 ++ TESTING.md | 3 ++ chefignore | 115 +++++++++++++++++++++++++++++++++++++++++++++ kitchen.dokken.yml | 113 ++++++++++++++++++++++++++++++++++++++++++++ kitchen.exec.yml | 7 +++ kitchen.global.yml | 38 +++++++++++++++ renovate.json | 16 ++++++- 13 files changed, 401 insertions(+), 12 deletions(-) create mode 100755 .editorconfig create mode 100644 .envrc create mode 100644 .overcommit.yml create mode 100644 .yamllint create mode 100644 CONTRIBUTING.md create mode 100644 TESTING.md create mode 100644 chefignore create mode 100644 kitchen.dokken.yml create mode 100644 kitchen.exec.yml create mode 100644 kitchen.global.yml diff --git a/.editorconfig b/.editorconfig new file mode 100755 index 0000000..cc21b04 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# https://EditorConfig.org + +# top-most EditorConfig file +root=true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# 2 space indentation +indent_style = space +indent_size = 2 + +# Avoid issues parsing cookbook files later +charset = utf-8 + +# Avoid cookstyle warnings +trim_trailing_whitespace = true diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..6ed589e --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use chefworkstation diff --git a/.gitattributes b/.gitattributes index bec73ce..6313b56 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1 @@ * text=auto eol=lf -.github/ export-ignore -.circleci/ export-ignore -.mdlrc export-ignore -.rubocop.yml export-ignore -Dangerfile export-ignore -*.sublime-project export-ignore diff --git a/.gitignore b/.gitignore index 28eeaba..be3b9a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,49 @@ -# Ignore personal Sublime Text 2 workspace -*.sublime-workspace +*.rbc +.config +InstalledFiles +pkg +test/tmp +test/version_tmp +tmp +_Store +*~ +*# +.#* +\#*# +*.un~ +*.tmp +*.bk +*.bkup -# Mac OS X cruft -.DS_Store +# editor files +.idea +.*.sw[a-z] + +# ruby/bundler/rspec files +.ruby-version +.ruby-gemset +.rvmrc +Gemfile.lock +.bundle +*.gem +coverage +spec/reports + +# YARD / rdoc artifacts +.yardoc +_yardoc +doc/ +rdoc + +# chef infra stuff +Berksfile.lock +.kitchen +kitchen.local.yml +vendor/ +.coverage/ +.zero-knife.rb +Policyfile.lock.json + +# vagrant stuff +.vagrant/ +.vagrant.d/ diff --git a/.overcommit.yml b/.overcommit.yml new file mode 100644 index 0000000..0e89a3c --- /dev/null +++ b/.overcommit.yml @@ -0,0 +1,24 @@ +--- +PreCommit: + TrailingWhitespace: + enabled: true + YamlLint: + enabled: true + required_executable: "yamllint" + ChefSpec: + enabled: true + required_executable: "chef" + command: ["chef", "exec", "rspec"] + Cookstyle: + enabled: true + 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/.yamllint b/.yamllint new file mode 100644 index 0000000..0046b23 --- /dev/null +++ b/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default +rules: + line-length: + max: 256 + level: warning + document-start: disable + braces: + forbid: false + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + comments: + min-spaces-from-content: 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a946aea --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,4 @@ +# Contributing + +Please refer to +[https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD) diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 0000000..920e381 --- /dev/null +++ b/TESTING.md @@ -0,0 +1,3 @@ +# Testing + +Please refer to [the community cookbook documentation on testing](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD). diff --git a/chefignore b/chefignore new file mode 100644 index 0000000..a27b0b2 --- /dev/null +++ b/chefignore @@ -0,0 +1,115 @@ +# Put files/directories that should be ignored in this file when uploading +# to a Chef Infra Server or Supermarket. +# Lines that start with '# ' are comments. + +# OS generated files # +###################### +.DS_Store +ehthumbs.db +Icon? +nohup.out +Thumbs.db +.envrc + +# EDITORS # +########### +.#* +.project +.settings +*_flymake +*_flymake.* +*.bak +*.sw[a-z] +*.tmproj +*~ +\#* +REVISION +TAGS* +tmtags +.vscode +.editorconfig + +## COMPILED ## +############## +*.class +*.com +*.dll +*.exe +*.o +*.pyc +*.so +*/rdoc/ +a.out +mkmf.log + +# Testing # +########### +.circleci/* +.codeclimate.yml +.delivery/* +.foodcritic +.kitchen* +.mdlrc +.overcommit.yml +.rspec +.rubocop.yml +.travis.yml +.watchr +.yamllint +azure-pipelines.yml +Dangerfile +examples/* +features/* +Guardfile +kitchen*.yml +mlc_config.json +Procfile +Rakefile +spec/* +test/* + +# SCM # +####### +.git +.gitattributes +.gitconfig +.github/* +.gitignore +.gitkeep +.gitmodules +.svn +*/.bzr/* +*/.git +*/.hg/* +*/.svn/* + +# Berkshelf # +############# +Berksfile +Berksfile.lock +cookbooks/* +tmp + +# Bundler # +########### +vendor/* +Gemfile +Gemfile.lock + +# Policyfile # +############## +Policyfile.rb +Policyfile.lock.json + +# Documentation # +############# +CODE_OF_CONDUCT* +CONTRIBUTING* +documentation/* +TESTING* +UPGRADING* + +# Vagrant # +########### +.vagrant +Vagrantfile diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml new file mode 100644 index 0000000..47eff95 --- /dev/null +++ b/kitchen.dokken.yml @@ -0,0 +1,113 @@ +driver: + name: dokken + privileged: true + chef_version: <%= ENV['CHEF_VERSION'] || 'current' %> + +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 + + - name: debian-10 + driver: + image: dokken/debian-10 + pid_one_command: /bin/systemd + + - name: debian-11 + driver: + 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: opensuse-leap-15 + driver: + 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 + + - name: ubuntu-20.04 + driver: + image: dokken/ubuntu-20.04 + pid_one_command: /bin/systemd + + - name: ubuntu-22.04 + driver: + 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..a0b29c8 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,18 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" + "extends": ["config:base"], + "packageRules": [ + { + "groupName": "Actions", + "matchUpdateTypes": ["minor", "patch", "pin"], + "automerge": true, + "addLabels": ["Release: Patch", "Skip: Announcements"] + }, + { + "groupName": "Actions", + "matchUpdateTypes": ["major"], + "automerge": false, + "addLabels": ["Release: Patch", "Skip: Announcements"] + } ] } From 7293611c6c18d1aeca9ab7d4c92636df864bcfc5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 15:40:00 -0500 Subject: [PATCH 2/2] Update Actions (#66) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 6 +++--- .github/workflows/lint.yml | 4 ++-- .github/workflows/syntax.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa3e48e..a00daed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run yaml Lint uses: actionshub/yamllint@main @@ -19,8 +19,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Markdown Lint - uses: DavidAnson/markdownlint-cli2-action@v13 + uses: DavidAnson/markdownlint-cli2-action@v16 with: globs: "**/*.md" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e2d9310..3d0fca2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,9 +16,9 @@ jobs: name: Flake8 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: # ST4 uses 3.8 internally python-version: 3.8.16 diff --git a/.github/workflows/syntax.yml b/.github/workflows/syntax.yml index 040dcca..39171a6 100644 --- a/.github/workflows/syntax.yml +++ b/.github/workflows/syntax.yml @@ -28,7 +28,7 @@ jobs: - build: 3210 # Latest known ST3 build with a test binary # packages: v3189 # Latest ST3 tag on the Packages repo steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: SublimeText/syntax-test-action@v2 with: build: ${{ matrix.build }}