Skip to content

Commit

Permalink
Modernize cookbook and update CI (#277)
Browse files Browse the repository at this point in the history
* Fix automatev2 resource idempotency

* linting fixes, ci updating, removal of EOL OSes

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
  • Loading branch information
Stromweld committed Aug 4, 2022
1 parent 6276ca4 commit ccb4283
Show file tree
Hide file tree
Showing 30 changed files with 454 additions and 349 deletions.
9 changes: 0 additions & 9 deletions .delivery/project.toml

This file was deleted.

233 changes: 233 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
on:
pull_request:

jobs:
markdownlint:
uses: Stromweld/github-workflows/.github/workflows/markdownlint.yml@main

yamllint:
uses: Stromweld/github-workflows/.github/workflows/yamllint.yml@main

jsonlint:
uses: Stromweld/github-workflows/.github/workflows/jsonlint.yml@main

cookstylelint:
uses: Stromweld/github-workflows/.github/workflows/cookstylelint.yml@main

integration-dokken:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- centos-7
- centos-8
- almalinux-8
# - almalinux-9 # TODO: uncomment this when almalinux-9 dokken image is fixed
- ubuntu-1804
- ubuntu-2004
- ubuntu-2204
suite:
- chef-workstation
- inspec
- chef-server
- chef-automatev2
exclude:
- os: centos-7
suite: chef-server
- os: ubuntu-2204
suite: chef-server
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@main
- name: Install Chef
uses: actionshub/chef-install@main
- name: Test-Kitchen Converge
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: converge
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
continue-on-error: false
- name: Test-Kitchen Verify
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: verify
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml


integration-windows-2016:
runs-on: windows-2016
strategy:
matrix:
os:
- windows-2016
suite:
- chef-workstation
- inspec
fail-fast: false
steps:
- name: Check windows Version
run: systeminfo
- name: Check out code
uses: actions/checkout@main
- name: Install Chef
uses: actionshub/chef-install@main
- name: Test-Kitchen Converge
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: converge
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml
continue-on-error: false
- name: Test-Kitchen Verify
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: verify
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml

integration-windows-2019:
runs-on: windows-2019
strategy:
matrix:
os:
- windows-2019
suite:
- chef-workstation
- inspec
fail-fast: false
steps:
- name: Check windows Version
run: systeminfo
- name: Check out code
uses: actions/checkout@main
- name: Install Chef
uses: actionshub/chef-install@main
- name: Test-Kitchen Converge
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: converge
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml
continue-on-error: false
- name: Test-Kitchen Verify
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: verify
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml

integration-windows-2022:
runs-on: windows-2022
strategy:
matrix:
os:
- windows-2022
suite:
- chef-workstation
- inspec
fail-fast: false
steps:
- name: Check windows Version
run: systeminfo
- name: Check out code
uses: actions/checkout@main
- name: Install Chef
uses: actionshub/chef-install@main
- name: Test-Kitchen Converge
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: converge
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml
continue-on-error: false
- name: Test-Kitchen Verify
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: verify
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml

integration-macos-latest:
runs-on: macos-latest
strategy:
matrix:
os:
- macos-latest
suite:
- chef-workstation
- inspec
fail-fast: false
steps:
- name: Check macOS Version
run: sw_vers
- name: Check out code
uses: actions/checkout@main
- name: Install Chef
uses: actionshub/chef-install@main
- name: Test-Kitchen Converge
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: converge
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml
continue-on-error: false
- name: Test-Kitchen Verify
uses: actionshub/test-kitchen@main
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
action: verify
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.exec.yml

check:
if: always()
needs:
- markdownlint
- yamllint
- jsonlint
- cookstylelint
- integration-dokken
- integration-windows-2016
- integration-windows-2019
- integration-windows-2022
- integration-macos-latest
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@main
with:
allowed-failures:
allowed-skips:
jobs: ${{ toJSON(needs) }}
16 changes: 0 additions & 16 deletions .github/workflows/delivery.yml

This file was deleted.

1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rules "~MD013"
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
AllCops:
TargetChefVersion: 13.0
TargetChefVersion: 17.0
47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions Berksfile

This file was deleted.

Loading

0 comments on commit ccb4283

Please sign in to comment.