Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ name: ci

jobs:
lint-unit:
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@8.0.2
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@9.0.0
permissions:
actions: write
checks: write
pull-requests: write
statuses: write
issues: write

integration:
needs: "lint-unit"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Install Chef
uses: actionshub/chef-install@main
- name: Install cookbooks
run: berks install
run: chef install Policyfile.rb
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ doc/
rdoc

# chef infra stuff
Berksfile.lock
.kitchen
kitchen.local.yml
vendor/
Expand Down
2 changes: 2 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ config:
line-length: false # MD013
no-duplicate-heading: false # MD024
reference-links-images: false # MD052
table-column-style: false # MD060
no-multiple-blanks:
maximum: 2
ignores:
- .github/copilot-instructions.md
- .windsurf/**
7 changes: 0 additions & 7 deletions Berksfile

This file was deleted.

96 changes: 96 additions & 0 deletions Policyfile.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"revision_id": "bf18368b30ce95d947afd06b4b533bd24ea6f91ca20393381ffd8a1734716b53",
"name": "logrotate",
"run_list": [
"recipe[test::default]"
],
"named_run_lists": {
"app": [
"recipe[test::app]"
],
"default": [
"recipe[test::default]"
],
"global": [
"recipe[test::global]"
]
},
"included_policy_locks": [

],
"cookbook_locks": {
"logrotate": {
"version": "3.0.31",
"identifier": "39c4b9fc25a907ad574a824b35cf8d3a723640a7",
"dotted_decimal_identifier": "16260376750827783.48791148496106959.155282163777703",
"source": ".",
"cache_key": null,
"scm_info": {
"scm": "git",
"remote": "git@github.com:sous-chefs/logrotate.git",
"revision": "f486071aface4ec847960c92de219de325b7c7f1",
"working_tree_clean": false,
"published": true,
"synchronized_remote_branches": [
"origin/HEAD -> origin/main",
"origin/main",
"origin/renovate/actions"
]
},
"source_options": {
"path": "."
}
},
"test": {
"version": "1.0.0",
"identifier": "7e6a09cef313cb14a6b03b86c142c3248d5f920d",
"dotted_decimal_identifier": "35582437424829387.5812775377355074.214561758089741",
"source": "test/cookbooks/test",
"cache_key": null,
"scm_info": {
"scm": "git",
"remote": "git@github.com:sous-chefs/logrotate.git",
"revision": "f486071aface4ec847960c92de219de325b7c7f1",
"working_tree_clean": false,
"published": true,
"synchronized_remote_branches": [
"origin/HEAD -> origin/main",
"origin/main",
"origin/renovate/actions"
]
},
"source_options": {
"path": "test/cookbooks/test"
}
}
},
"default_attributes": {

},
"override_attributes": {

},
"solution_dependencies": {
"Policyfile": [
[
"logrotate",
">= 0.0.0"
],
[
"test",
">= 0.0.0"
]
],
"dependencies": {
"logrotate (3.0.31)": [

],
"test (1.0.0)": [
[
"logrotate",
">= 0.0.0"
]
]
}
}
}
14 changes: 14 additions & 0 deletions Policyfile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

name 'logrotate'

run_list 'test::default'

cookbook 'logrotate', path: '.'
cookbook 'test', path: './test/cookbooks/test'

Dir.children('./test/cookbooks/test/recipes').grep(/\.rb\z/).sort.each do |recipe|
recipe_name = File.basename(recipe, '.rb')

named_run_list recipe_name.to_sym, "test::#{recipe_name}"
end
5 changes: 0 additions & 5 deletions chefignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ test/*
*/.hg/*
*/.svn/*

# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp

# Bundler #
Expand Down
13 changes: 11 additions & 2 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
driver:
name: dokken
privileged: true
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
chef_image: "<%= ENV.fetch('KITCHEN_PRODUCT_NAME', 'cinc') == 'cinc' ? 'cincproject/cinc' : 'chef/chef' %>"
chef_version: "<%= ENV['CHEF_VERSION'] || (ENV.fetch('KITCHEN_PRODUCT_NAME', 'cinc') == 'cinc' ? 'latest' : 'current') %>"

transport: { name: dokken }
provisioner: { name: dokken }
provisioner:
name: dokken
chef_binary: "<%= ENV.fetch('KITCHEN_PRODUCT_NAME', 'cinc') == 'cinc' ? '/opt/cinc/bin/cinc-client' : '/opt/chef/bin/chef-client' %>"
product_name: "<%= ENV['KITCHEN_PRODUCT_NAME'] || 'cinc' %>"

platforms:
- name: almalinux-8
Expand Down Expand Up @@ -37,6 +41,11 @@ platforms:
image: dokken/centos-stream-10
pid_one_command: /usr/lib/systemd/systemd

- name: debian-11
driver:
image: dokken/debian-11
pid_one_command: /bin/systemd

- name: debian-12
driver:
image: dokken/debian-12
Expand Down
3 changes: 2 additions & 1 deletion kitchen.global.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
provisioner:
name: chef_infra
name: policyfile_zero
product_name: chef
product_version: <%= ENV['CHEF_VERSION'] || 'latest' %>
channel: stable
Expand All @@ -10,6 +10,7 @@ provisioner:
multiple_converge: <%= ENV['MULTIPLE_CONVERGE'] || 2 %>
deprecations_as_errors: true
log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %>
policyfile: Policyfile.rb

verifier:
name: inspec
Expand Down
7 changes: 4 additions & 3 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ driver:
name: vagrant

provisioner:
name: chef_infra
name: policyfile_zero
deprecations_as_errors: true
chef_license: accept-no-persist
product_name: chef
product_version: <%= ENV['CHEF_VERSION'] || 'latest' %>
install_strategy: once
enforce_idempotency: true
multiple_converge: 2
policyfile: Policyfile.rb

verifier:
name: inspec
Expand All @@ -28,5 +29,5 @@ platforms:

suites:
- name: default
run_list:
- recipe[test::default]
provisioner:
named_run_list: default
4 changes: 3 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'chefspec'
require 'chefspec/berkshelf'
require 'chefspec/policyfile'

RSpec.configure do |config|
config.color = true # Use color in STDOUT
Expand Down
Loading