From e52a508a99fc627a89010538570c8d8c9ff5b822 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 12:36:38 -0500 Subject: [PATCH 01/22] Update automatev2.rb --- resources/automatev2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/automatev2.rb b/resources/automatev2.rb index f6f4e2f..b99e5a0 100644 --- a/resources/automatev2.rb +++ b/resources/automatev2.rb @@ -49,7 +49,7 @@ execute "/usr/local/bin/chef-automate deploy #{Chef::Config[:file_cache_path]}/config.toml --product #{new_resource.products.join(' --product ')}#{' --accept-terms-and-mlsa' if new_resource.accept_license}" do cwd Chef::Config[:file_cache_path] only_if { FileTest.file?("#{Chef::Config[:file_cache_path]}/config.toml") } - not_if 'chef-automate service-versions' + not_if '/usr/bin/chef-automate service-versions' end file "#{Chef::Config[:file_cache_path]}/custom_config.toml" do From f0e96a643d19d4bdd903a777cb95beedf09c2431 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 12:41:20 -0500 Subject: [PATCH 02/22] Update automatev2.rb --- resources/automatev2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/automatev2.rb b/resources/automatev2.rb index b99e5a0..aa39042 100644 --- a/resources/automatev2.rb +++ b/resources/automatev2.rb @@ -49,7 +49,7 @@ execute "/usr/local/bin/chef-automate deploy #{Chef::Config[:file_cache_path]}/config.toml --product #{new_resource.products.join(' --product ')}#{' --accept-terms-and-mlsa' if new_resource.accept_license}" do cwd Chef::Config[:file_cache_path] only_if { FileTest.file?("#{Chef::Config[:file_cache_path]}/config.toml") } - not_if '/usr/bin/chef-automate service-versions' + not_if '/usr/local/bin/chef-automate service-versions' end file "#{Chef::Config[:file_cache_path]}/custom_config.toml" do From d4513d0475abf76a62125669b4e715a121a1ae5c Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 12:57:32 -0500 Subject: [PATCH 03/22] Update automatev2.rb --- resources/automatev2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/automatev2.rb b/resources/automatev2.rb index aa39042..baefda9 100644 --- a/resources/automatev2.rb +++ b/resources/automatev2.rb @@ -49,7 +49,7 @@ execute "/usr/local/bin/chef-automate deploy #{Chef::Config[:file_cache_path]}/config.toml --product #{new_resource.products.join(' --product ')}#{' --accept-terms-and-mlsa' if new_resource.accept_license}" do cwd Chef::Config[:file_cache_path] only_if { FileTest.file?("#{Chef::Config[:file_cache_path]}/config.toml") } - not_if '/usr/local/bin/chef-automate service-versions' + not_if { FileTest.file?('/usr/bin/chef-automate') && shell_out('/usr/bin/chef-automate service-versions').exitstatus.eql?(0) } end file "#{Chef::Config[:file_cache_path]}/custom_config.toml" do From 421acebe713a67618d4524deb1d3ac4c49990e5f Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 14:15:37 -0500 Subject: [PATCH 04/22] linting fixes, ci updating, removal of EOL OSes Signed-off-by: Corey Hemminger --- .delivery/project.toml | 9 --- .github/workflows/ci.yml | 57 +++++++++++++++++++ .github/workflows/delivery.yml | 16 ------ .rubocop.yml | 2 +- .travis.yml | 16 ++---- appveyor.yml | 3 +- kitchen.appveyor.yml | 4 +- kitchen.dokken.yml | 24 -------- kitchen.yml | 35 ++++++------ metadata.rb | 4 +- spec/unit/metadata.rb | 1 + .../test/recipes/chef_workstation.rb | 4 +- .../test_chef_automatev2_spec.rb | 8 +++ 13 files changed, 96 insertions(+), 87 deletions(-) delete mode 100644 .delivery/project.toml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/delivery.yml diff --git a/.delivery/project.toml b/.delivery/project.toml deleted file mode 100644 index 0d6f0ae..0000000 --- a/.delivery/project.toml +++ /dev/null @@ -1,9 +0,0 @@ -[local_phases] -unit = "rspec spec/" -lint = 'cookstyle --display-cop-names --extra-details' -syntax = "echo skipping" -provision = "echo skipping" -deploy = "echo skipping" -smoke = "echo skipping" -functional = "echo skipping" -cleanup = "echo skipping" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..46ccb4f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +--- +name: ci + +"on": + pull_request: + push: + branches: + - main + +jobs: + lint-unit: + uses: sous-chefs/.github/.github/workflows/lint-unit.yml@main + permissions: + actions: write + checks: write + pull-requests: write + statuses: write + issues: write + + integration: + needs: lint-unit + runs-on: ubuntu-latest + strategy: + matrix: + os: + - almalinux-8 + - centos-7 + - debian-10 + - debian-11 + - rockylinux-8 + - ubuntu-1804 + - ubuntu-2004 + suite: + - chef_workstation + - chef_server + - chef_automatev2 + fail-fast: false + + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: Install Chef + uses: actionshub/chef-install@main + - name: Dokken + uses: actionshub/test-kitchen@main + env: + CHEF_LICENSE: accept-no-persist + KITCHEN_LOCAL_YAML: kitchen.dokken.yml + with: + suite: ${{ matrix.suite }} + os: ${{ matrix.os }} + - name: Print debug output on failure + if: failure() + run: | + set -x + sudo journalctl -l --since today + KITCHEN_LOCAL_YAML=kitchen.dokken.yml /usr/bin/kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl -l" diff --git a/.github/workflows/delivery.yml b/.github/workflows/delivery.yml deleted file mode 100644 index 628af88..0000000 --- a/.github/workflows/delivery.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: delivery - -on: [push, pull_request] - -jobs: - delivery: - - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@master - - name: Run Chef Delivery - uses: actionshub/chef-delivery@main - env: - CHEF_LICENSE: accept-no-persist diff --git a/.rubocop.yml b/.rubocop.yml index de89e5a..a056dcc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,2 +1,2 @@ AllCops: - TargetChefVersion: 13.0 + TargetChefVersion: 17.0 diff --git a/.travis.yml b/.travis.yml index a153648..76ff82c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ addons: apt: sources: - - chef-current-xenial + - chef-current-bionic packages: - chef-workstation @@ -18,18 +18,15 @@ services: docker env: matrix: - - INSTANCE=chefdk-debian-9 - INSTANCE=chefdk-debian-10 - - INSTANCE=chefdk-centos-6 - INSTANCE=chefdk-centos-7 - INSTANCE=chefdk-centos-8 - - INSTANCE=chefdk-centos-7 CHEF_VERSION=13 - - INSTANCE=chefdk-centos-7 CHEF_VERSION=14 - - INSTANCE=chefdk-ubuntu-1604 + - INSTANCE=chefdk-centos-8 CHEF_VERSION=16 + - INSTANCE=chefdk-centos-8 CHEF_VERSION=17 - INSTANCE=chefdk-ubuntu-1804 - INSTANCE=chefdk-ubuntu-2004 - - INSTANCE=chefdk-ubuntu-1604 CHEF_VERSION=13 - - INSTANCE=chefdk-ubuntu-1604 CHEF_VERSION=14 + - INSTANCE=chefdk-ubuntu-1804 CHEF_VERSION=16 + - INSTANCE=chefdk-ubuntu-1804 CHEF_VERSION=17 before_script: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) @@ -41,7 +38,6 @@ script: KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen verify ${INSTANCE} matrix: include: - script: - - delivery local all + - cookstyle --display-cop-names --extra-details env: - - UNIT_AND_LINT=1 - CHEF_LICENSE=accept diff --git a/appveyor.yml b/appveyor.yml index 9b54eed..afab063 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,8 +5,8 @@ environment: KITCHEN_YAML: kitchen.appveyor.yml matrix: - - CHEF_VERSION: 15 - CHEF_VERSION: 16 + - CHEF_VERSION: 17 # don't build PRs twice branches: @@ -37,7 +37,6 @@ build_script: test_script: - chef --version - - chef.exe exec delivery local all - chef.exe exec kitchen verify deploy: off diff --git a/kitchen.appveyor.yml b/kitchen.appveyor.yml index 20f8b01..b1dcef2 100644 --- a/kitchen.appveyor.yml +++ b/kitchen.appveyor.yml @@ -12,12 +12,12 @@ transport: elevated: true provisioner: - name: chef_zero + name: chef_infra deprecations_as_errors: true chef_license: accept-no-persist platforms: - - name: windows-2012R2 + - name: windows-2019 suites: - name: inspec diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 391f801..93d701f 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -19,23 +19,11 @@ verifier: name: inspec platforms: - - name: amazonlinux - driver: - image: dokken/amazonlinux - pid_one_command: /sbin/init - - name: amazonlinux-2 driver: image: dokken/amazonlinux-2 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 @@ -43,11 +31,6 @@ platforms: intermediate_instructions: - RUN /usr/bin/apt-get update - - name: centos-6 - driver: - image: dokken/centos-6 - pid_one_command: /sbin/init - - name: centos-7 driver: image: dokken/centos-7 @@ -63,13 +46,6 @@ platforms: image: dokken/fedora-latest pid_one_command: /usr/lib/systemd/systemd - - name: ubuntu-16.04 - driver: - image: dokken/ubuntu-16.04 - pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - - name: ubuntu-18.04 driver: image: dokken/ubuntu-18.04 diff --git a/kitchen.yml b/kitchen.yml index 9260f10..6ff16f0 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -6,7 +6,7 @@ driver: provisioner: require_chef_omnibus: <%= ENV['CHEF_VERSION'] || true %> - name: chef_zero + name: chef_infra data_bags_path: test/fixtures/data_bags deprecations_as_errors: true retry_on_exit_code: @@ -24,32 +24,26 @@ verifier: name: inspec platforms: - - name: amazonlinux - driver_config: - box: mvbcoding/awslinux - name: amazonlinux-2 - - name: centos-6 - name: centos-7 - name: centos-8 - - name: debian-9 - name: debian-10 - name: fedora-latest - name: freebsd-12 - name: opensuse-leap-15 - - name: ubuntu-16.04 - name: ubuntu-18.04 - name: ubuntu-20.04 - name: macos-10.12 driver: box: chef/macos-10.12 # private - - name: windows-server-2012r2 + - name: windows-server-2016 driver: - box: tas50/windows_2012r2 + box: stromweld/windows-2016 customize: cpus: 4 - - name: windows-server-2016 + - name: windows-server-2019 driver_config: - box: tas50/windows_2016 + box: stromweld/windows-2019 customize: cpus: 4 @@ -63,7 +57,7 @@ default: &default suites: - name: default <<: *default - excludes: [ 'macos-10.12', 'windows-server-2012r2', 'windows-server-2016-standard' ] + excludes: [ 'macos-10.12', 'windows-server-2016', 'windows-server-2019' ] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -73,24 +67,27 @@ suites: - name: local_package_install <<: *default - excludes: [ 'macos-10.12', 'windows-server-2012r2', 'windows-server-2016-standard' ] + excludes: [ 'macos-10.12', 'windows-server-2016', 'windows-server-2019' ] run_list: - recipe[test] - recipe[test::local] - - name: chefdk + - name: chef_workstation <<: *default - includes: [ 'ubuntu-16.04', 'ubuntu-18.04', 'ubuntu-20.04', 'centos-6', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-2012r2', 'windows-server-2016-standard' ] + includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-20126', 'windows-server-2019' ] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] <% end %> - recipe[test] - - recipe[test::chefdk] + - recipe[test::chef_workstation] + verifier: + inspec_tests: + - test/integration/chef-workstation - name: inspec <<: *default - includes: [ 'ubuntu-16.04', 'ubuntu-18.04', 'ubuntu-20.04', 'centos-6', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-2012r2', 'windows-server-2016-standard' ] + includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-2016', 'windows-server-2019' ] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -99,7 +96,7 @@ suites: - recipe[test::inspec] - name: chef_server - includes: [ 'ubuntu-16.04', 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8' ] + includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8' ] run_list: - recipe[test] - recipe[test::chef_server] @@ -108,7 +105,7 @@ suites: driver: customize: memory: 2560 - includes: [ 'ubuntu-16.04', 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8' ] + includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8' ] run_list: - recipe[test::automatev2] verifier: diff --git a/metadata.rb b/metadata.rb index 74e1ba6..60ddecc 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'cookbooks@chef.io' license 'Apache-2.0' description 'Primitives for managing Chef products and packages' -version '3.4.0' +version '3.4.1' %w(amazon centos redhat scientific oracle fedora debian ubuntu).each do |os| supports os @@ -12,4 +12,4 @@ source_url 'https://github.com/chef-cookbooks/chef-ingredient' issues_url 'https://github.com/chef-cookbooks/chef-ingredient/issues' -chef_version '>= 13.0' +chef_version '>= 15.3' diff --git a/spec/unit/metadata.rb b/spec/unit/metadata.rb index 8feb43a..b8ecfea 100644 --- a/spec/unit/metadata.rb +++ b/spec/unit/metadata.rb @@ -1 +1,2 @@ name 'FC045-not-a-cookbook' +version '0.0.1' diff --git a/test/fixtures/cookbooks/test/recipes/chef_workstation.rb b/test/fixtures/cookbooks/test/recipes/chef_workstation.rb index aadb65d..511b0e1 100644 --- a/test/fixtures/cookbooks/test/recipes/chef_workstation.rb +++ b/test/fixtures/cookbooks/test/recipes/chef_workstation.rb @@ -1,13 +1,13 @@ chef_ingredient 'install old chef-workstation version' do product_name 'chef-workstation' action :install - version '0.18.3' + version '21.1.247' platform_version_compatibility_mode true end chef_ingredient 'upgrade to newer chef-workstation version' do product_name 'chef-workstation' action :upgrade - version '21.1.247' + version '22.7.1006' platform_version_compatibility_mode true end diff --git a/test/integration/chef_automatev2/test_chef_automatev2_spec.rb b/test/integration/chef_automatev2/test_chef_automatev2_spec.rb index 5c939fd..eece52b 100644 --- a/test/integration/chef_automatev2/test_chef_automatev2_spec.rb +++ b/test/integration/chef_automatev2/test_chef_automatev2_spec.rb @@ -2,6 +2,14 @@ # its('exit_status') { should eq 0 } # end +describe file('/usr/local/bin/chef-automate') do + it { should_not exist } +end + +describe file('/usr/bin/chef-automate') do + it { should exist } +end + describe command('chef-automate version') do its('exit_status') { should eq 0 } end From c05a053eb7e6f03afbd14270968c058778995d21 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 15:07:01 -0500 Subject: [PATCH 05/22] linting fixes Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 2 ++ .mdlrc | 1 + .rubocop.yml | 1 + .travis.yml | 4 +-- Berksfile | 6 ---- CHANGELOG.md | 78 ++++++++++++++++++++-------------------- CONTRIBUTING.md | 2 +- Policyfile.rb | 22 ++++++++++++ README.md | 22 ++++++------ appveyor.yml | 1 + kitchen.dokken.yml | 1 + kitchen.yml | 13 +++---- 12 files changed, 87 insertions(+), 66 deletions(-) create mode 100644 .mdlrc delete mode 100644 Berksfile create mode 100644 Policyfile.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46ccb4f..13445e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,8 @@ name: ci jobs: lint-unit: uses: sous-chefs/.github/.github/workflows/lint-unit.yml@main + with: + gems: "" permissions: actions: write checks: write diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..b7e0825 --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +rules "~MD013" diff --git a/.rubocop.yml b/.rubocop.yml index a056dcc..2c347c4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,2 +1,3 @@ +--- AllCops: TargetChefVersion: 17.0 diff --git a/.travis.yml b/.travis.yml index 76ff82c..a5c5d87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +--- addons: apt: sources: @@ -7,9 +8,6 @@ addons: install: echo "skip bundle install" -env: - - CHEF_LICENSE=accept - branches: only: - master diff --git a/Berksfile b/Berksfile deleted file mode 100644 index 1978348..0000000 --- a/Berksfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://supermarket.chef.io' - -metadata - -cookbook 'test', path: './test/fixtures/cookbooks/test' -cookbook 'custom_repo', path: './test/fixtures/cookbooks/custom_repo' diff --git a/CHANGELOG.md b/CHANGELOG.md index b3e151a..0c977cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -183,8 +183,8 @@ This file is used to list changes made in each version of the chef-ingredient co - Remove `chef_server_ingredient` resource shim - Update mixlib-install to major version 3 - - `platform_version_compatibility_mode` property no longer has a default value - - If no matching artifacts are found a `Mixlib::Install::Backend::ArtifactsNotFound` exception is raised instead a `RuntimeError` +- `platform_version_compatibility_mode` property no longer has a default value +- If no matching artifacts are found a `Mixlib::Install::Backend::ArtifactsNotFound` exception is raised instead a `RuntimeError` - All resources have been converted to custom resources ## 1.1.0 (2017-03-01) @@ -232,74 +232,74 @@ This file is used to list changes made in each version of the chef-ingredient co - Swap the Policyfile for a Berksfile - Remove unnecessary action and default_action properties from the custom resources -# v0.19.0 +## v0.19.0 - Remove delivery-cli examples and tests (we now shipit with ChefDK) - Set version constraint to ~> 1.1 for installing mixlib-install from Rubygems -# v0.18.5 +## v0.18.5 - [#106](https://github.com/chef-cookbooks/chef-ingredient/pull/106) Limit `remote_file` backups to 1 - [#110](https://github.com/chef-cookbooks/chef-ingredient/pull/110) Get rid of default: nil warnings -# v0.18.4 +## v0.18.4 - Add `platform_version_compatibility_mode` property to `chef_ingredient` which makes chef-ingredient select packages built for earlier version of a platform during install when a package does not exist for the current platform version. -# v0.18.3 +## v0.18.3 - Add `accept_license` property to `chef_ingredient` which can accept license for Chef products when applicable. -# v0.18.2 +## v0.18.2 - Set version constraint to ~> 1.0 for installing mixlib-install from Rubygems -# v0.18.1 +## v0.18.1 - Bump mixlib-install version to 1.0.6 so unstable channel artifacts won't include metadata.json files. -# v0.18.0 +## v0.18.0 - [#85](https://github.com/chef-cookbooks/chef-ingredient/pull/85) Ability to support unstable channel for all products / platforms. - [#90](https://github.com/chef-cookbooks/chef-ingredient/pull/90) Use packages from packages.chef.io instead of package cloud & remove packagecloud repository setup. - [#91](https://github.com/chef-cookbooks/chef-ingredient/pull/91) Deprecate chef-ha, chef-marketplace, chef-sync, push-client, push-server in favor of ha, marketplace, sync, push-jobs-client, push-jobs-server. -# v0.17.0 +## v0.17.0 - [#77](https://github.com/chef-cookbooks/chef-ingredient/pull/77) Enable installation of chef and chefdk from unstable - [#82](https://github.com/chef-cookbooks/chef-ingredient/pull/82) Set `--force-yes` for older Debian/Ubuntu -# v0.16.0 +## v0.16.0 - [#62](https://github.com/chef-cookbooks/chef-ingredient/issues/62) Do not assume connection to the internet, allow custom recipe for a local repository - [#75](https://github.com/chef-cookbooks/chef-ingredient/pull/75) omnitruck handler windows implementation -# v0.15.0 +## v0.15.0 - [#66](https://github.com/chef-cookbooks/chef-ingredient/pull/66) Fix push job client and server naming - [#68](https://github.com/chef-cookbooks/chef-ingredient/pull/68) Use mixlib-install while installing / upgrading packages from omnitruck - [#71](https://github.com/chef-cookbooks/chef-ingredient/pull/71) Convert `omnibus_service` and `ingredient_config` to "12.5 [custom resources](https://docs.chef.io/custom_resources.html)" - [#73](https://github.com/chef-cookbooks/chef-ingredient/pull/73) Use PRODUCT_MATRIX from mixlib-install -# v0.14.0 +## v0.14.0 - [#58](https://github.com/chef-cookbooks/chef-ingredient/pull/58) Add Chef Compliance product -# v0.13.1 +## v0.13.1 - [#57](https://github.com/chef-cookbooks/chef-ingredient/pull/57) Content accumulator guard -# v0.13.0 +## v0.13.0 - [#56](https://github.com/chef-cookbooks/chef-ingredient/pull/56) Uncomment `use_inline_resources`, this is required for the providers to work properly - [#55](https://github.com/chef-cookbooks/chef-ingredient/pull/55) Remove unit tests for specifically the custom resources - [#54](https://github.com/chef-cookbooks/chef-ingredient/pull/54) Clarify maintainer/support in the README -# v0.12.1 +## v0.12.1 - [#53](https://github.com/chef-cookbooks/chef-ingredient/pull/53) Relax version constraints -# v0.12.0 +## v0.12.0 - Refactor `chef_ingredient` and prepare to handle install/upgrade from omnitruck - Add channel property to `chef_ingredient` @@ -307,100 +307,100 @@ This file is used to list changes made in each version of the chef-ingredient co - Use `product_name` instead of `package_name` - Add not if to skip `ingredient_config` render if `config` property isn't used -# v0.11.3 +## v0.11.3 - Remove `resource_name` from Provider because `:facepalm:` -# v0.11.2 +## v0.11.2 - Add `repository` and `master_token` properties to `chef_server_ingredient` shim for compatibility -# v0.11.1 +## v0.11.1 - [#37](https://github.com/chef-cookbooks/chef-ingredient/issues/37) use `define_matchers` for ChefSpec -# v0.11.0 +## v0.11.0 - [#35](https://github.com/chef-cookbooks/chef-ingredient/issues/35) Add `fqdn_resolves?` method for `chef-server` cookbook. -# v0.10.2 +## v0.10.2 - Add `:add` action to `ingredient_config` -# v0.10.1 +## v0.10.1 - [#30](https://github.com/chef-cookbooks/chef-ingredient/issues/30) Supermarket doesn't use supermarket.rb for configuration, it's supermarket.json -# v0.10.0 +## v0.10.0 - [#23](https://github.com/chef-cookbooks/chef-ingredient/pull/23) Add Chef Marketplace - [#29](https://github.com/chef-cookbooks/chef-ingredient/pull/29) Fix RSpec and noisy warnings -# v0.9.1 +## v0.9.1 - [#26](https://github.com/chef-cookbooks/chef-ingredient/issues/26) Remove mode, owner, and group properties from `ingredient_config`'s resources to prevent resource updates after running ctl commands that manage those file permissions. -# v0.9.0 +## v0.9.0 - Add sensitive property to `ingredient_config` - Use recipe DSL to set resource name -# v0.8.1 +## v0.8.1 - Update PRODUCT_MATRIX.md with correct updated Chef Push product names (push-server, push-client). The code was updated but not the document. -# v0.8.0 +## v0.8.0 - [#7](https://github.com/chef-cookbooks/chef-ingredient/issues/7) Add `ingredient_config` resource - [#10](https://github.com/chef-cookbooks/chef-ingredient/pull/10) Add upgrade action for `chef_ingredient` - Test cleanup, various rubocop fixes -# v0.7.0 +## v0.7.0 - [#3](https://github.com/chef-cookbooks/chef-ingredient/issues/3) Allow :latest as a version - Removes the `package_name` property from the `chef_ingredient` resource, long live `product_name` -# v0.6.0 +## v0.6.0 **Breaking changes** This version is backwards-incompatible with previous versions. We're still sub-1.0, but those who wish to use the `chef_server_ingredient` resource really should pin to version 0.5.0. - [#1](https://github.com/chef-cookbooks/chef-ingredient/issues/1) Use product names instead of package names. -# v0.5.0 +## v0.5.0 - Major refactor and rename. It's fine, this is a new cookbook! -# v0.4.0 (2015-06-11) +## v0.4.0 (2015-06-11) - Add timeout attribute to `chef_server_ingredient` - Use `declare_resource` DSL method to select local package resource - Allow specifying the repository name for the packagecloud repo -# v0.3.2 (2015-04-15) +## v0.3.2 (2015-04-15) - adding proxy support for packagecloud -# v0.3.1 (2015-04-09) +## v0.3.1 (2015-04-09) - Various refactoring and cleanup -# v0.3.0 +## v0.3.0 - Add ctl command for supermarket -# v0.2.0 +## v0.2.0 - Add reconfigure property to ingredient resource -# v0.1.0 +## v0.1.0 - Release this cookbook to Supermarket -# v0.0.2 +## v0.0.2 - #4: define the installed attribute - #1, #2, use packagecloud cookbook -# v0.0.1 +## v0.0.1 - Initial release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef2f2b8..0943d17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,2 +1,2 @@ Please refer to -https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD + diff --git a/Policyfile.rb b/Policyfile.rb new file mode 100644 index 0000000..d0d5e16 --- /dev/null +++ b/Policyfile.rb @@ -0,0 +1,22 @@ +# Policyfile.rb - Describe how you want Chef Infra Client to build your system. +# +# For more information on the Policyfile feature, visit +# https://docs.chef.io/policyfile/ + +# A name that describes what the system you're building with Chef does. +name 'chef-ingredient' + +# Where to find external cookbooks: +default_source :supermarket + +# run_list: chef-client will run these recipes in the order specified. +run_list 'chef-ingredientt::default' +named_run_list :test_install_git, 'test::install_git' +named_run_list :chef_automatev2, 'chef_software::chef_automatev2' +named_run_list :chef_server, 'chef_software::chef_server' +named_run_list :chef_supermarket, 'chef_software::chef_supermarket' + +# Specify a custom source for a single cookbook: +cookbook 'test', path: './test/fixtures/cookbooks/test' +cookbook 'custom_repo', path: './test/fixtures/cookbooks/custom_repo' + diff --git a/README.md b/README.md index 836b881..2f7831b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ A "chef ingredient" is the core package itself, or products or add-on components By default, `chef_ingredient` will install using the `packages.chef.io` stable repository depending on the platform. However, it can be configured to use a custom repository by setting the `node['chef-ingredient']['custom-repo-recipe']` attribute (nil by default). -#### Actions +#### chef_ingredient Actions - `install` - (default) Configures the package repository and installs the specified package. - `upgrade` - Upgrades the specified package. @@ -46,7 +46,7 @@ By default, `chef_ingredient` will install using the `packages.chef.io` stable r - `remove` - Alias for uninstall - `reconfigure` - Performs the `ctl reconfigure` command for the package. -#### Properties +#### chef_ingredient Properties - `product_name` - The product name. See the [PRODUCT_MATRIX.md](https://github.com/chef/mixlib-install/blob/master/PRODUCT_MATRIX.md). For example, `chef-server`, `analytics`, `delivery`, `manage`, etc. - `config` - content that will be added to the configuration file of the given product. @@ -67,11 +67,11 @@ By default, `chef_ingredient` will install using the `packages.chef.io` stable r Manages a sub-service within the context of a Chef product package. For example the `rabbitmq` service that is run for the Chef Server. -#### Actions +#### omnibus_service Actions This delegates to the ctl command the service management command specified in the action. Not all the service management commands are supported, however, as not all of them would make sense when used in a recipe. This resource is primarily used for sending or receiving notifications. See the example section. -#### Properties +#### omnibus_service Properties - `service_name` - The name of the service to manage. Specify this like `product_name/service`, for example, `chef-server/rabbitmq`. - `ctl_command` - The "ctl" command, e.g. `chef-server-ctl`. This should be automatically detected by the library helper method `chef_ctl_command`, but may need to be specified if something changes, like a new add-on is made available. @@ -80,18 +80,18 @@ This delegates to the ctl command the service management command specified in th Makes it easy to create update configuration files of each Chef product. It uses the default locations for each product. -#### Actions +#### ingredient_config Actions - `render` - (default) Creates the configuration file using the options passed in via `add` action or `config` attribute of `chef_ingredient` resource. - `add` - Adds the `config` attribute contents to the data collection. Must run `:render` action to generate the file. -#### Properties +#### ingredient_config Properties - `product_name` - The product name. See the [PRODUCT_MATRIX.md](https://github.com/chef/mixlib-install/blob/master/PRODUCT_MATRIX.md). For example, `chef-server`, `analytics`, `delivery`, `manage`, etc. - `config` - Content that will be added to the configuration file of the given product. - `sensitive` - Set to mask the config contents in logs. Use when you config contains information like passwords or secrets. -#### Examples +#### ingredient_config Examples We may need to restart the RabbitMQ service on the Chef Server, for example when adding configuration for Chef Analytics. @@ -164,7 +164,7 @@ These properties exist for all infrastructure resources Installs Chef Automate. -#### Properties +#### chef_automate Properties - `enterprise` - The Enterprise to create in Automate - `license` - we recommend using the chef_file resource @@ -177,14 +177,14 @@ Installs Chef Automate. Installs Chef Automate version 2 -#### Requirements +#### chef_automatev2 Requirements - Requires chef-client 14+ due to use of sysctl resource - General Properties used ### chef_backend -#### Properties +#### chef_backend Properties - `bootstrap_node` - The node we'll bootstrap secrets with. - `publish_address` - node['ipaddress'] | The address you want Chef-Backend to listen on. @@ -194,7 +194,7 @@ Installs Chef Automate version 2 ### chef_org -#### Properties +#### chef_org Properties - `org` - The short name of the org. - `org_full_name` - The full name of the org you want to create. diff --git a/appveyor.yml b/appveyor.yml index afab063..1bce239 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,4 @@ +--- environment: machine_user: vagrant machine_pass: vagrant diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 93d701f..de84b03 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -1,3 +1,4 @@ +--- driver: name: dokken privileged: true # because Docker and SystemD/Upstart diff --git a/kitchen.yml b/kitchen.yml index 6ff16f0..51e5e98 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -1,3 +1,4 @@ +--- driver: name: vagrant customize: @@ -57,7 +58,7 @@ default: &default suites: - name: default <<: *default - excludes: [ 'macos-10.12', 'windows-server-2016', 'windows-server-2019' ] + excludes: ['macos-10.12', 'windows-server-2016', 'windows-server-2019'] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -67,14 +68,14 @@ suites: - name: local_package_install <<: *default - excludes: [ 'macos-10.12', 'windows-server-2016', 'windows-server-2019' ] + excludes: ['macos-10.12', 'windows-server-2016', 'windows-server-2019'] run_list: - recipe[test] - recipe[test::local] - name: chef_workstation <<: *default - includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-20126', 'windows-server-2019' ] + includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-20126', 'windows-server-2019'] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -87,7 +88,7 @@ suites: - name: inspec <<: *default - includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-2016', 'windows-server-2019' ] + includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-2016', 'windows-server-2019'] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -96,7 +97,7 @@ suites: - recipe[test::inspec] - name: chef_server - includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8' ] + includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8'] run_list: - recipe[test] - recipe[test::chef_server] @@ -105,7 +106,7 @@ suites: driver: customize: memory: 2560 - includes: [ 'ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8' ] + includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8'] run_list: - recipe[test::automatev2] verifier: From f5e0ee18708a0eb096b511e336b65d28f3e33619 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 15:22:51 -0500 Subject: [PATCH 06/22] ci update Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 191 ++++++++++++++++++++++++++++++++------- Policyfile.rb | 1 - kitchen.yml | 12 +++ 3 files changed, 169 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13445e5..9f26ac4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,59 +1,182 @@ ---- -name: ci - -"on": +on: pull_request: - push: - branches: - - main jobs: - lint-unit: - uses: sous-chefs/.github/.github/workflows/lint-unit.yml@main - with: - gems: "" - permissions: - actions: write - checks: write - pull-requests: write - statuses: write - issues: write - - integration: - needs: lint-unit + 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: - - almalinux-8 - centos-7 - - debian-10 - - debian-11 - - rockylinux-8 - - ubuntu-1804 + - centos-8 + - almalinux-8 + - almalinux-9 - ubuntu-2004 + - ubuntu-2204 suite: - chef_workstation - chef_server - chef_automatev2 fail-fast: false - steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@main - name: Install Chef uses: actionshub/chef-install@main - - name: Dokken + - 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-server-2016 + suite: [ 'chef_workstation' ] + 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: true + - 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-server-2019 + suite: [ 'chef_workstation' ] + 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 }} - - name: Print debug output on failure - if: failure() - run: | - set -x - sudo journalctl -l --since today - KITCHEN_LOCAL_YAML=kitchen.dokken.yml /usr/bin/kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl -l" + action: converge + env: + CHEF_LICENSE: accept-no-persist + KITCHEN_LOCAL_YAML: kitchen.exec.yml + continue-on-error: true + - 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-server-2022 + suite: [ 'chef_workstation' ] + 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: true + - 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 + 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) }} diff --git a/Policyfile.rb b/Policyfile.rb index d0d5e16..1e55844 100644 --- a/Policyfile.rb +++ b/Policyfile.rb @@ -19,4 +19,3 @@ # Specify a custom source for a single cookbook: cookbook 'test', path: './test/fixtures/cookbooks/test' cookbook 'custom_repo', path: './test/fixtures/cookbooks/custom_repo' - diff --git a/kitchen.yml b/kitchen.yml index 51e5e98..1753acd 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -25,15 +25,22 @@ verifier: name: inspec platforms: + - name: almalinux-8 + - name: almalinux-9 - name: amazonlinux-2 - name: centos-7 - name: centos-8 - name: debian-10 + - name: debian-11 - name: fedora-latest - name: freebsd-12 + - name: freebsd-13 - name: opensuse-leap-15 + - name: rockylinux-8 + - name: rockylinux-9 - name: ubuntu-18.04 - name: ubuntu-20.04 + - name: ubuntu-22.04 - name: macos-10.12 driver: box: chef/macos-10.12 # private @@ -47,6 +54,11 @@ platforms: box: stromweld/windows-2019 customize: cpus: 4 + - name: windows-server-2022 + driver_config: + box: stromweld/windows-2022 + customize: + cpus: 4 default: &default attributes: From b3384ccda1f1b073f9d687eee94709a090c9974f Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 15:27:28 -0500 Subject: [PATCH 07/22] fix kitchen indenting Signed-off-by: Corey Hemminger --- kitchen.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 1753acd..5081c82 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -55,10 +55,10 @@ platforms: customize: cpus: 4 - name: windows-server-2022 - driver_config: - box: stromweld/windows-2022 - customize: - cpus: 4 + driver_config: + box: stromweld/windows-2022 + customize: + cpus: 4 default: &default attributes: From cfeca2a2d33c68cf3e6cf08c116527adeffca619 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 15:34:13 -0500 Subject: [PATCH 08/22] fix kitchen indent and add macos-latest platform Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ kitchen.yml | 1 + 2 files changed, 37 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f26ac4..47a5454 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,6 +161,41 @@ jobs: 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' ] + 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: true + - 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: @@ -172,6 +207,7 @@ jobs: - 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 diff --git a/kitchen.yml b/kitchen.yml index 5081c82..d57331b 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -44,6 +44,7 @@ platforms: - name: macos-10.12 driver: box: chef/macos-10.12 # private + - name: macos-latest # Used for CI pipeline - name: windows-server-2016 driver: box: stromweld/windows-2016 From 2123a16bb06fb42311c631bded22e6021932fc61 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 15:52:05 -0500 Subject: [PATCH 09/22] test Signed-off-by: Corey Hemminger --- kitchen.dokken.yml | 39 ++++++++++++++++++++++++++++----------- kitchen.yml | 27 ++++++++++----------------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index de84b03..5feb00c 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -20,6 +20,20 @@ verifier: name: inspec platforms: + - name: almalinux-8 + driver: + image: dokken/almalinux-8 + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update + + - name: almalinux-9 + driver: + image: dokken/almalinux-9 + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update + - name: amazonlinux-2 driver: image: dokken/amazonlinux-2 @@ -32,6 +46,13 @@ platforms: intermediate_instructions: - RUN /usr/bin/apt-get update + - name: debian-11 + driver: + image: dokken/debian-11 + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update + - name: centos-7 driver: image: dokken/centos-7 @@ -61,18 +82,14 @@ platforms: intermediate_instructions: - RUN /usr/bin/apt-get update + - name: ubuntu-22.04 + driver: + image: dokken/ubuntu-22.04 + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update + - name: opensuse-leap-15 driver: image: dokken/opensuse-leap-15 pid_one_command: /bin/systemd - -suites: - - name: chef-workstation - run_list: - - recipe[test] - - recipe[test::chef_workstation] - - - name: rubygems-url - run_list: - - recipe[test] - - recipe[test::rubygems_url] diff --git a/kitchen.yml b/kitchen.yml index d57331b..10111ad 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -61,17 +61,9 @@ platforms: customize: cpus: 4 -default: &default - attributes: - chef-ingredient: - mixlib-install: - # Set to install mixlib-install from source - git_ref: <%= ENV['MIXLIB_INSTALL_GIT_REF'] %> - suites: - name: default - <<: *default - excludes: ['macos-10.12', 'windows-server-2016', 'windows-server-2019'] + excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -80,15 +72,18 @@ suites: - recipe[test::repo] - name: local_package_install - <<: *default - excludes: ['macos-10.12', 'windows-server-2016', 'windows-server-2019'] + excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] run_list: - recipe[test] - recipe[test::local] + - name: rubygems-url + excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] + run_list: + - recipe[test] + - recipe[test::rubygems_url] + - name: chef_workstation - <<: *default - includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-20126', 'windows-server-2019'] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -100,8 +95,6 @@ suites: - test/integration/chef-workstation - name: inspec - <<: *default - includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8', 'macos-10.12', 'windows-server-2016', 'windows-server-2019'] run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -110,7 +103,7 @@ suites: - recipe[test::inspec] - name: chef_server - includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8'] + includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04', 'centos-7', 'centos-8'] run_list: - recipe[test] - recipe[test::chef_server] @@ -119,7 +112,7 @@ suites: driver: customize: memory: 2560 - includes: ['ubuntu-18.04', 'ubuntu-20.04', 'centos-7', 'centos-8'] + includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04', 'centos-7', 'centos-8'] run_list: - recipe[test::automatev2] verifier: From 1c9130314c28bb354e28c1ffe5efc5da688f220c Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 15:57:19 -0500 Subject: [PATCH 10/22] fix suite names Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 15 ++++++++------- kitchen.yml | 8 ++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47a5454..6d4ea73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,12 +23,13 @@ jobs: - centos-8 - almalinux-8 - almalinux-9 + - ubuntu-1804 - ubuntu-2004 - ubuntu-2204 suite: - - chef_workstation - - chef_server - - chef_automatev2 + - chef-workstation + - chef-server + - chef-automatev2 fail-fast: false steps: - name: Check out code @@ -62,7 +63,7 @@ jobs: matrix: os: - windows-server-2016 - suite: [ 'chef_workstation' ] + suite: [ 'chef-workstation' ] fail-fast: false steps: - name: Check windows Version @@ -97,7 +98,7 @@ jobs: matrix: os: - windows-server-2019 - suite: [ 'chef_workstation' ] + suite: [ 'chef-workstation' ] fail-fast: false steps: - name: Check windows Version @@ -132,7 +133,7 @@ jobs: matrix: os: - windows-server-2022 - suite: [ 'chef_workstation' ] + suite: [ 'chef-workstation' ] fail-fast: false steps: - name: Check windows Version @@ -167,7 +168,7 @@ jobs: matrix: os: - macos-latest - suite: [ 'chef_workstation' ] + suite: [ 'chef-workstation' ] fail-fast: false steps: - name: Check macOS Version diff --git a/kitchen.yml b/kitchen.yml index 10111ad..9645e41 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -71,7 +71,7 @@ suites: - recipe[test] - recipe[test::repo] - - name: local_package_install + - name: local-package-install excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] run_list: - recipe[test] @@ -83,7 +83,7 @@ suites: - recipe[test] - recipe[test::rubygems_url] - - name: chef_workstation + - name: chef-workstation run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - recipe[test::install_git] @@ -102,13 +102,13 @@ suites: - recipe[test] - recipe[test::inspec] - - name: chef_server + - name: chef-server includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04', 'centos-7', 'centos-8'] run_list: - recipe[test] - recipe[test::chef_server] - - name: chef_automatev2 + - name: chef-automatev2 driver: customize: memory: 2560 From 5877cd32a90c6611c02232f113da18e5ceb1f84d Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 16:01:19 -0500 Subject: [PATCH 11/22] fix policyfile typo Signed-off-by: Corey Hemminger --- Policyfile.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Policyfile.rb b/Policyfile.rb index 1e55844..a3013e4 100644 --- a/Policyfile.rb +++ b/Policyfile.rb @@ -10,11 +10,7 @@ default_source :supermarket # run_list: chef-client will run these recipes in the order specified. -run_list 'chef-ingredientt::default' -named_run_list :test_install_git, 'test::install_git' -named_run_list :chef_automatev2, 'chef_software::chef_automatev2' -named_run_list :chef_server, 'chef_software::chef_server' -named_run_list :chef_supermarket, 'chef_software::chef_supermarket' +run_list 'chef-ingredient::default' # Specify a custom source for a single cookbook: cookbook 'test', path: './test/fixtures/cookbooks/test' From d60079b7cd3ffa5c04e30ce9942380286c12932a Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 16:16:48 -0500 Subject: [PATCH 12/22] update tests Signed-off-by: Corey Hemminger --- .../test_chef_automatev2_spec.rb | 0 .../test_chef_server_spec.rb | 0 .../chef-workstation/test_chef_workstation_spec.rb | 14 ++------------ .../assert_local_package_installed_spec.rb | 0 4 files changed, 2 insertions(+), 12 deletions(-) rename test/integration/{chef_automatev2 => chef-automatev2}/test_chef_automatev2_spec.rb (100%) rename test/integration/{chef_server => chef-server}/test_chef_server_spec.rb (100%) rename test/integration/{local_package_install => local-package-install}/assert_local_package_installed_spec.rb (100%) diff --git a/test/integration/chef_automatev2/test_chef_automatev2_spec.rb b/test/integration/chef-automatev2/test_chef_automatev2_spec.rb similarity index 100% rename from test/integration/chef_automatev2/test_chef_automatev2_spec.rb rename to test/integration/chef-automatev2/test_chef_automatev2_spec.rb diff --git a/test/integration/chef_server/test_chef_server_spec.rb b/test/integration/chef-server/test_chef_server_spec.rb similarity index 100% rename from test/integration/chef_server/test_chef_server_spec.rb rename to test/integration/chef-server/test_chef_server_spec.rb diff --git a/test/integration/chef-workstation/test_chef_workstation_spec.rb b/test/integration/chef-workstation/test_chef_workstation_spec.rb index 7e90af3..587eff5 100644 --- a/test/integration/chef-workstation/test_chef_workstation_spec.rb +++ b/test/integration/chef-workstation/test_chef_workstation_spec.rb @@ -3,16 +3,6 @@ # has not been reloaded. This reloads $env:Path before calling the program. I could see this being beneficial to # inspec's default behavior. -resource_command = 'command' - -if os.windows? - resource_command = 'powershell' - - describe powershell('$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")') do - its('exit_status') { should eq 0 } - end -end - -describe send(resource_command, 'chef --version') do - its('stdout') { should match(/Chef Workstation version: 21\.1\.247/) } +describe package('chef-workstation') do + it { should be_installed } end diff --git a/test/integration/local_package_install/assert_local_package_installed_spec.rb b/test/integration/local-package-install/assert_local_package_installed_spec.rb similarity index 100% rename from test/integration/local_package_install/assert_local_package_installed_spec.rb rename to test/integration/local-package-install/assert_local_package_installed_spec.rb From 2c226479a89d771caca235be2d95ab1f3383eb56 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 16:34:56 -0500 Subject: [PATCH 13/22] add named_run_list Signed-off-by: Corey Hemminger --- Policyfile.rb | 9 ++++++++ kitchen.dokken.yml | 8 ++----- kitchen.yml | 52 ++++++++++++++++++++-------------------------- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/Policyfile.rb b/Policyfile.rb index a3013e4..2169d26 100644 --- a/Policyfile.rb +++ b/Policyfile.rb @@ -11,7 +11,16 @@ # run_list: chef-client will run these recipes in the order specified. run_list 'chef-ingredient::default' +named_run_list :test, 'test' +named_run_list :test_install_git, 'test::install_git' +named_run_list :test_repo, 'test::repo' +named_run_list :test_local, 'test::local' +named_run_list :test_chef_workstation, 'test::chef_workstation' +named_run_list :test_inspec, 'test::ispec' +named_run_list :test_chef_server, 'test::chef_server' +named_run_list :test_chef_automatev2, 'test::automatev2' # Specify a custom source for a single cookbook: +cookbook 'chef-ingredient', path: '.' cookbook 'test', path: './test/fixtures/cookbooks/test' cookbook 'custom_repo', path: './test/fixtures/cookbooks/custom_repo' diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 5feb00c..5061051 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -23,16 +23,12 @@ platforms: - name: almalinux-8 driver: image: dokken/almalinux-8 - pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update + pid_one_command: /usr/lib/systemd/systemd - name: almalinux-9 driver: image: dokken/almalinux-9 - pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update + pid_one_command: /usr/lib/systemd/systemd - name: amazonlinux-2 driver: diff --git a/kitchen.yml b/kitchen.yml index 9645e41..3a186ab 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -64,57 +64,51 @@ platforms: suites: - name: default excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] - run_list: + namec_run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - - recipe[test::install_git] + - test_install_git <% end %> - - recipe[test] - - recipe[test::repo] + - test + - test_repo - name: local-package-install excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] - run_list: - - recipe[test] - - recipe[test::local] + named_run_list: + - test + - test_local - name: rubygems-url excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] - run_list: - - recipe[test] - - recipe[test::rubygems_url] + named_run_list: + - test + - test_rubygems_url - name: chef-workstation - run_list: + named_run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - - recipe[test::install_git] + - test_install_git <% end %> - - recipe[test] - - recipe[test::chef_workstation] - verifier: - inspec_tests: - - test/integration/chef-workstation + - test + - test_chef_workstation - name: inspec - run_list: + named_run_list: <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - - recipe[test::install_git] + - test_install_git <% end %> - - recipe[test] - - recipe[test::inspec] + - test + - test_inspec - name: chef-server includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04', 'centos-7', 'centos-8'] - run_list: - - recipe[test] - - recipe[test::chef_server] + named_run_list: + - test + - test_chef_server - name: chef-automatev2 driver: customize: memory: 2560 includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04', 'centos-7', 'centos-8'] - run_list: - - recipe[test::automatev2] - verifier: - inspec_tests: - - test/integration/chef_automatev2 + named_run_list: + - test_chef_automatev2 From e099e2ff68e2033b0d4b97e0b546b00f781da8d6 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 16:37:52 -0500 Subject: [PATCH 14/22] fix recipe name Signed-off-by: Corey Hemminger --- Policyfile.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Policyfile.rb b/Policyfile.rb index 2169d26..765a2a1 100644 --- a/Policyfile.rb +++ b/Policyfile.rb @@ -16,7 +16,7 @@ named_run_list :test_repo, 'test::repo' named_run_list :test_local, 'test::local' named_run_list :test_chef_workstation, 'test::chef_workstation' -named_run_list :test_inspec, 'test::ispec' +named_run_list :test_inspec, 'test::inspec' named_run_list :test_chef_server, 'test::chef_server' named_run_list :test_chef_automatev2, 'test::automatev2' From 6fd1dbdc67dbcdde19d03391bca5d83793be8c27 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 16:54:49 -0500 Subject: [PATCH 15/22] test Signed-off-by: Corey Hemminger --- Policyfile.rb | 12 ++++++------ kitchen.yml | 33 +++++++-------------------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/Policyfile.rb b/Policyfile.rb index 765a2a1..e2dfe1f 100644 --- a/Policyfile.rb +++ b/Policyfile.rb @@ -13,12 +13,12 @@ run_list 'chef-ingredient::default' named_run_list :test, 'test' named_run_list :test_install_git, 'test::install_git' -named_run_list :test_repo, 'test::repo' -named_run_list :test_local, 'test::local' -named_run_list :test_chef_workstation, 'test::chef_workstation' -named_run_list :test_inspec, 'test::inspec' -named_run_list :test_chef_server, 'test::chef_server' -named_run_list :test_chef_automatev2, 'test::automatev2' +named_run_list :test_repo, %w(test::install_git test test::repo) +named_run_list :test_local, %w(test::install_git test test::local) +named_run_list :test_chef_workstation, %w(test::install_git test test::chef_workstation) +named_run_list :test_inspec, %w(test::install_git test test::inspec) +named_run_list :test_chef_server, %w(test::install_git test test::chef_server) +named_run_list :test_chef_automatev2, %w(test::install_git test test::automatev2) # Specify a custom source for a single cookbook: cookbook 'chef-ingredient', path: '.' diff --git a/kitchen.yml b/kitchen.yml index 3a186ab..9ad29de 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -64,51 +64,32 @@ platforms: suites: - name: default excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] - namec_run_list: - <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> + named_run_list: - test_install_git - <% end %> - test - test_repo - name: local-package-install excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] - named_run_list: - - test - - test_local + named_run_list: test_local - name: rubygems-url excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] - named_run_list: - - test - - test_rubygems_url + named_run_list: test_rubygems_url - name: chef-workstation - named_run_list: - <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - - test_install_git - <% end %> - - test - - test_chef_workstation + named_run_list: test_chef_workstation - name: inspec - named_run_list: - <% if ENV['MIXLIB_INSTALL_GIT_REF'] %> - - test_install_git - <% end %> - - test - - test_inspec + named_run_list: test_inspec - name: chef-server includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04', 'centos-7', 'centos-8'] - named_run_list: - - test - - test_chef_server + named_run_list: test_chef_server - name: chef-automatev2 driver: customize: memory: 2560 includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-18.04', 'ubuntu-20.04', 'ubuntu-22.04', 'centos-7', 'centos-8'] - named_run_list: - - test_chef_automatev2 + named_run_list: test_chef_automatev2 From 7be9f012191a3e9073be8e1985b0611ffdb1df6a Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 27 Jul 2022 17:11:21 -0500 Subject: [PATCH 16/22] test Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 8 ++++---- Policyfile.rb | 2 +- kitchen.exec.yml | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 kitchen.exec.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d4ea73..524d605 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - centos-7 - centos-8 - almalinux-8 - - almalinux-9 +# - almalinux-9 - ubuntu-1804 - ubuntu-2004 - ubuntu-2204 @@ -62,7 +62,7 @@ jobs: strategy: matrix: os: - - windows-server-2016 + - windows-2016 suite: [ 'chef-workstation' ] fail-fast: false steps: @@ -97,7 +97,7 @@ jobs: strategy: matrix: os: - - windows-server-2019 + - windows-2019 suite: [ 'chef-workstation' ] fail-fast: false steps: @@ -132,7 +132,7 @@ jobs: strategy: matrix: os: - - windows-server-2022 + - windows-2022 suite: [ 'chef-workstation' ] fail-fast: false steps: diff --git a/Policyfile.rb b/Policyfile.rb index e2dfe1f..0246fa5 100644 --- a/Policyfile.rb +++ b/Policyfile.rb @@ -17,7 +17,7 @@ named_run_list :test_local, %w(test::install_git test test::local) named_run_list :test_chef_workstation, %w(test::install_git test test::chef_workstation) named_run_list :test_inspec, %w(test::install_git test test::inspec) -named_run_list :test_chef_server, %w(test::install_git test test::chef_server) +named_run_list :test_chef_server, %w(test::install_git test test::chef_server_noaddons) named_run_list :test_chef_automatev2, %w(test::install_git test test::automatev2) # Specify a custom source for a single cookbook: diff --git a/kitchen.exec.yml b/kitchen.exec.yml new file mode 100644 index 0000000..bddc73c --- /dev/null +++ b/kitchen.exec.yml @@ -0,0 +1,15 @@ +--- +driver: + name: exec + gui: false + customize: + memory: 4096 + +transport: + name: exec + +platforms: + - name: windows-2016 + - name: windows-2019 + - name: windows-2022 + - name: macos-latest From 2fe206d31117d7034753d344b5f19398bc5d1ea2 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 28 Jul 2022 13:12:47 -0500 Subject: [PATCH 17/22] fix chef-server tests Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 3 +++ Policyfile.rb | 8 ++++---- attributes/default.rb | 1 + libraries/helpers.rb | 10 +++++----- .../cookbooks/test/recipes/chef_server_noaddons.rb | 9 +++++++-- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 524d605..7342cbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,9 @@ jobs: - chef-workstation - chef-server - chef-automatev2 + exclude: + - os: centos-7 + suite: chef-server fail-fast: false steps: - name: Check out code diff --git a/Policyfile.rb b/Policyfile.rb index 0246fa5..b1fe448 100644 --- a/Policyfile.rb +++ b/Policyfile.rb @@ -15,10 +15,10 @@ named_run_list :test_install_git, 'test::install_git' named_run_list :test_repo, %w(test::install_git test test::repo) named_run_list :test_local, %w(test::install_git test test::local) -named_run_list :test_chef_workstation, %w(test::install_git test test::chef_workstation) -named_run_list :test_inspec, %w(test::install_git test test::inspec) -named_run_list :test_chef_server, %w(test::install_git test test::chef_server_noaddons) -named_run_list :test_chef_automatev2, %w(test::install_git test test::automatev2) +named_run_list :test_chef_workstation, 'test::chef_workstation' +named_run_list :test_inspec,'test::inspec' +named_run_list :test_chef_server, 'test::chef_server_noaddons' +named_run_list :test_chef_automatev2, 'test::automatev2' # Specify a custom source for a single cookbook: cookbook 'chef-ingredient', path: '.' diff --git a/attributes/default.rb b/attributes/default.rb index 383e4aa..bca2394 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -32,3 +32,4 @@ # a revision, branch or tag. # default['chef-ingredient']['mixlib-install']['git_ref'] = nil +default['chef-ingredient']['mixlib-install']['version'] = nil # nil installs latest diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 8f36c21..be08e07 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -68,7 +68,7 @@ def ingredient_config_file(product_name) # def ensure_mixlib_versioning_gem_installed! node.run_state[:mixlib_versioning_gem_installed] ||= begin - install_gem_from_rubygems('mixlib-versioning', '~> 1.1') + install_gem_from_rubygems('mixlib-versioning') require 'mixlib/versioning' true @@ -87,7 +87,7 @@ def ensure_mixlib_install_gem_installed! 'mixlib-install' ) else - install_gem_from_rubygems('mixlib-install', '~> 3.3') + install_gem_from_rubygems('mixlib-install', node['chef-ingredient']['mixlib-install']['version']) end require 'mixlib/install' @@ -99,11 +99,11 @@ def ensure_mixlib_install_gem_installed! # # Helper method to install a gem from rubygems at compile time. # - def install_gem_from_rubygems(gem_name, gem_version) - Chef::Log.debug("Installing #{gem_name} v#{gem_version} from #{new_resource.rubygems_url}") + def install_gem_from_rubygems(gem_name, gem_version = nil) + Chef::Log.debug("Installing #{gem_name}#{" v#{gem_version}" if gem_version} from #{new_resource.rubygems_url}") chefgem = Chef::Resource::ChefGem.new(gem_name, run_context) chefgem.source(new_resource.rubygems_url) if new_resource.rubygems_url - chefgem.version(gem_version) + chefgem.version(gem_version) if gem_version chefgem.run_action(:install) end diff --git a/test/fixtures/cookbooks/test/recipes/chef_server_noaddons.rb b/test/fixtures/cookbooks/test/recipes/chef_server_noaddons.rb index 0e5ef3e..e920290 100644 --- a/test/fixtures/cookbooks/test/recipes/chef_server_noaddons.rb +++ b/test/fixtures/cookbooks/test/recipes/chef_server_noaddons.rb @@ -1,3 +1,8 @@ -chef_server 'chef-server.local' do - config '' +node.default['chef_server']['fqdn'] = 'localhost' + +chef_server node['chef_server']['fqdn'] do + config <<-EOS +api_fqdn '#{node['chef_server']['fqdn']}' + EOS + accept_license true end From fe815be8bfb5b4591b1dbe4391abc65b8b07c89e Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 28 Jul 2022 14:39:27 -0500 Subject: [PATCH 18/22] update tests Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 19 ++++++-- .travis.yml | 41 ------------------ appveyor.yml | 43 ------------------- kitchen.appveyor.yml | 25 ----------- kitchen.yml | 12 +++--- .../test/recipes/chef_workstation.rb | 11 +---- .../fixtures/cookbooks/test/recipes/inspec.rb | 10 +---- .../test_chef_automatev2_spec.rb | 8 +++- .../test_chef_workstation_spec.rb | 11 ++++- test/integration/inspec/inspec_spec.rb | 23 +++++----- 10 files changed, 49 insertions(+), 154 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100644 kitchen.appveyor.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7342cbc..2b34e11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,11 +28,14 @@ jobs: - 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 @@ -66,7 +69,9 @@ jobs: matrix: os: - windows-2016 - suite: [ 'chef-workstation' ] + suite: + - chef-workstation + - inspec fail-fast: false steps: - name: Check windows Version @@ -101,7 +106,9 @@ jobs: matrix: os: - windows-2019 - suite: [ 'chef-workstation' ] + suite: + - chef-workstation + - inspec fail-fast: false steps: - name: Check windows Version @@ -136,7 +143,9 @@ jobs: matrix: os: - windows-2022 - suite: [ 'chef-workstation' ] + suite: + - chef-workstation + - inspec fail-fast: false steps: - name: Check windows Version @@ -171,7 +180,9 @@ jobs: matrix: os: - macos-latest - suite: [ 'chef-workstation' ] + suite: + - chef-workstation + - inspec fail-fast: false steps: - name: Check macOS Version diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a5c5d87..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -addons: - apt: - sources: - - chef-current-bionic - packages: - - chef-workstation - -install: echo "skip bundle install" - -branches: - only: - - master - -services: docker - -env: - matrix: - - INSTANCE=chefdk-debian-10 - - INSTANCE=chefdk-centos-7 - - INSTANCE=chefdk-centos-8 - - INSTANCE=chefdk-centos-8 CHEF_VERSION=16 - - INSTANCE=chefdk-centos-8 CHEF_VERSION=17 - - INSTANCE=chefdk-ubuntu-1804 - - INSTANCE=chefdk-ubuntu-2004 - - INSTANCE=chefdk-ubuntu-1804 CHEF_VERSION=16 - - INSTANCE=chefdk-ubuntu-1804 CHEF_VERSION=17 - -before_script: - - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - - eval "$(chef shell-init bash)" - - chef --version - -script: KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen verify ${INSTANCE} - -matrix: - include: - - script: - - cookstyle --display-cop-names --extra-details - env: - - CHEF_LICENSE=accept diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 1bce239..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -environment: - machine_user: vagrant - machine_pass: vagrant - CHEF_LICENSE: accept - KITCHEN_YAML: kitchen.appveyor.yml - - matrix: - - CHEF_VERSION: 16 - - CHEF_VERSION: 17 - -# don't build PRs twice -branches: - only: - - master - -# Do not build on tags (GitHub only) -skip_tags: true - -#faster cloning -clone_depth: 1 - -# Install the latest current build of Chef Workstation -install: - - ps: iex (irm https://omnitruck.chef.io/install.ps1); Install-Project -Project chef-workstation -channel stable - - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version' - - ps: $PSVersionTable - - ps: secedit /export /cfg $env:temp/export.cfg - - ps: ((get-content $env:temp/export.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File $env:temp/export.cfg - - ps: ((get-content $env:temp/export.cfg) -replace ('MinimumPasswordLength = 8', 'MinimumPasswordLength = 0')) | Out-File $env:temp/export.cfg - - ps: secedit /configure /db $env:windir/security/new.sdb /cfg $env:temp/export.cfg /areas SECURITYPOLICY - - ps: net user /add $env:machine_user $env:machine_pass - - ps: net localgroup administrators $env:machine_user /add - -build_script: - - ps: $env:PATH = "$env:PATH;c:\opscode\chef-workstation\bin\"; $env:CHEFWS_ENV_FIX = 1 - - ps: c:\opscode\chef-workstation\bin\chef.exe shell-init powershell | iex; cmd /c c:\opscode\chef-workstation\bin\chef.exe --version - -test_script: - - chef --version - - chef.exe exec kitchen verify - -deploy: off diff --git a/kitchen.appveyor.yml b/kitchen.appveyor.yml deleted file mode 100644 index b1dcef2..0000000 --- a/kitchen.appveyor.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -driver: - name: proxy - host: localhost - reset_command: "exit 0" - port: 5985 - username: <%= ENV["machine_user"] %> - password: <%= ENV["machine_pass"] %> - -transport: - name: winrm - elevated: true - -provisioner: - name: chef_infra - deprecations_as_errors: true - chef_license: accept-no-persist - -platforms: - - name: windows-2019 - -suites: - - name: inspec - run_list: - - recipe[test::inspec] diff --git a/kitchen.yml b/kitchen.yml index 9ad29de..e015c15 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -45,17 +45,17 @@ platforms: driver: box: chef/macos-10.12 # private - name: macos-latest # Used for CI pipeline - - name: windows-server-2016 + - name: windows-2016 driver: box: stromweld/windows-2016 customize: cpus: 4 - - name: windows-server-2019 + - name: windows-2019 driver_config: box: stromweld/windows-2019 customize: cpus: 4 - - name: windows-server-2022 + - name: windows-2022 driver_config: box: stromweld/windows-2022 customize: @@ -63,18 +63,18 @@ platforms: suites: - name: default - excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] + excludes: ['macos-10.12', 'macos-latest', 'windows-2016', 'windows-2019', 'windows-2022'] named_run_list: - test_install_git - test - test_repo - name: local-package-install - excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] + excludes: ['macos-10.12', 'macos-latest', 'windows-2016', 'windows-2019', 'windows-2022'] named_run_list: test_local - name: rubygems-url - excludes: ['macos-10.12', 'macos-latest', 'windows-server-2016', 'windows-server-2019', 'windows-sever-2022'] + excludes: ['macos-10.12', 'macos-latest', 'windows-2016', 'windows-2019', 'windows-2022'] named_run_list: test_rubygems_url - name: chef-workstation diff --git a/test/fixtures/cookbooks/test/recipes/chef_workstation.rb b/test/fixtures/cookbooks/test/recipes/chef_workstation.rb index 511b0e1..25bb01f 100644 --- a/test/fixtures/cookbooks/test/recipes/chef_workstation.rb +++ b/test/fixtures/cookbooks/test/recipes/chef_workstation.rb @@ -1,13 +1,4 @@ -chef_ingredient 'install old chef-workstation version' do +chef_ingredient 'install chef-workstation' do product_name 'chef-workstation' - action :install - version '21.1.247' - platform_version_compatibility_mode true -end - -chef_ingredient 'upgrade to newer chef-workstation version' do - product_name 'chef-workstation' - action :upgrade - version '22.7.1006' platform_version_compatibility_mode true end diff --git a/test/fixtures/cookbooks/test/recipes/inspec.rb b/test/fixtures/cookbooks/test/recipes/inspec.rb index 944b52d..553babc 100644 --- a/test/fixtures/cookbooks/test/recipes/inspec.rb +++ b/test/fixtures/cookbooks/test/recipes/inspec.rb @@ -1,12 +1,4 @@ -chef_ingredient 'install old inspec version' do +chef_ingredient 'install inspec version' do product_name 'inspec' - version '1.30.0' - platform_version_compatibility_mode true -end - -chef_ingredient 'upgrade to newer inspec version' do - product_name 'inspec' - action :upgrade - version '1.31.1' platform_version_compatibility_mode true end diff --git a/test/integration/chef-automatev2/test_chef_automatev2_spec.rb b/test/integration/chef-automatev2/test_chef_automatev2_spec.rb index eece52b..619fd27 100644 --- a/test/integration/chef-automatev2/test_chef_automatev2_spec.rb +++ b/test/integration/chef-automatev2/test_chef_automatev2_spec.rb @@ -6,7 +6,13 @@ it { should_not exist } end -describe file('/usr/bin/chef-automate') do +bin_path = if os.debian? + '/bin/chef-automate' + else + '/usr/bin/chef-automate' + end + +describe file(bin_path) do it { should exist } end diff --git a/test/integration/chef-workstation/test_chef_workstation_spec.rb b/test/integration/chef-workstation/test_chef_workstation_spec.rb index 587eff5..ca372b1 100644 --- a/test/integration/chef-workstation/test_chef_workstation_spec.rb +++ b/test/integration/chef-workstation/test_chef_workstation_spec.rb @@ -3,6 +3,13 @@ # has not been reloaded. This reloads $env:Path before calling the program. I could see this being beneficial to # inspec's default behavior. -describe package('chef-workstation') do +pkg_name = case os.family + when 'bsd' + 'com.getchef.pkg.chef-workstation' + else + 'chef-workstation' + end + +describe package(pkg_name) do it { should be_installed } -end +end unless os.windows? diff --git a/test/integration/inspec/inspec_spec.rb b/test/integration/inspec/inspec_spec.rb index ea35d9c..f69ab2c 100644 --- a/test/integration/inspec/inspec_spec.rb +++ b/test/integration/inspec/inspec_spec.rb @@ -3,16 +3,13 @@ # has not been reloaded. This reloads $env:Path before calling the program. I could see this being beneficial to # inspec's default behavior. -resource_command = 'command' - -if os.windows? - resource_command = 'powershell' - - describe powershell('$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")') do - its('exit_status') { should eq 0 } - end -end - -describe send(resource_command, 'inspec --version') do - its('stdout') { should match(/4.22.1/) } -end +pkg_name = case os.family + when 'bsd' + 'com.getchef.pkg.inspec' + else + 'inspec' + end + +describe package(pkg_name) do + it { should be_installed } +end unless os.windows? From db4865616ba3cdd4adda89d62706cb0c3849ff6e Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 28 Jul 2022 15:23:08 -0500 Subject: [PATCH 19/22] update tests Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 8 ++++---- .../chef-workstation/test_chef_workstation_spec.rb | 11 ++--------- test/integration/inspec/inspec_spec.rb | 11 ++--------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b34e11..034b26c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: env: CHEF_LICENSE: accept-no-persist KITCHEN_LOCAL_YAML: kitchen.exec.yml - continue-on-error: true + continue-on-error: false - name: Test-Kitchen Verify uses: actionshub/test-kitchen@main with: @@ -126,7 +126,7 @@ jobs: env: CHEF_LICENSE: accept-no-persist KITCHEN_LOCAL_YAML: kitchen.exec.yml - continue-on-error: true + continue-on-error: false - name: Test-Kitchen Verify uses: actionshub/test-kitchen@main with: @@ -163,7 +163,7 @@ jobs: env: CHEF_LICENSE: accept-no-persist KITCHEN_LOCAL_YAML: kitchen.exec.yml - continue-on-error: true + continue-on-error: false - name: Test-Kitchen Verify uses: actionshub/test-kitchen@main with: @@ -200,7 +200,7 @@ jobs: env: CHEF_LICENSE: accept-no-persist KITCHEN_LOCAL_YAML: kitchen.exec.yml - continue-on-error: true + continue-on-error: false - name: Test-Kitchen Verify uses: actionshub/test-kitchen@main with: diff --git a/test/integration/chef-workstation/test_chef_workstation_spec.rb b/test/integration/chef-workstation/test_chef_workstation_spec.rb index ca372b1..a0124ef 100644 --- a/test/integration/chef-workstation/test_chef_workstation_spec.rb +++ b/test/integration/chef-workstation/test_chef_workstation_spec.rb @@ -3,13 +3,6 @@ # has not been reloaded. This reloads $env:Path before calling the program. I could see this being beneficial to # inspec's default behavior. -pkg_name = case os.family - when 'bsd' - 'com.getchef.pkg.chef-workstation' - else - 'chef-workstation' - end - -describe package(pkg_name) do +describe package('chef-workstation') do it { should be_installed } -end unless os.windows? +end unless os.windows? || os.darwin? diff --git a/test/integration/inspec/inspec_spec.rb b/test/integration/inspec/inspec_spec.rb index f69ab2c..45e2767 100644 --- a/test/integration/inspec/inspec_spec.rb +++ b/test/integration/inspec/inspec_spec.rb @@ -3,13 +3,6 @@ # has not been reloaded. This reloads $env:Path before calling the program. I could see this being beneficial to # inspec's default behavior. -pkg_name = case os.family - when 'bsd' - 'com.getchef.pkg.inspec' - else - 'inspec' - end - -describe package(pkg_name) do +describe package('inspec') do it { should be_installed } -end unless os.windows? +end unless os.windows? || os.darwin? From 3339df9e4de0138756ec27f8b04c6cb587df2245 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 28 Jul 2022 15:57:00 -0500 Subject: [PATCH 20/22] update version Signed-off-by: Corey Hemminger --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 6 ++++++ README.md | 4 ++-- metadata.rb | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 034b26c..eb3be0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - centos-7 - centos-8 - almalinux-8 -# - almalinux-9 +# - almalinux-9 # TODO: uncomment this when almalinux-9 dokken image is fixed - ubuntu-1804 - ubuntu-2004 - ubuntu-2204 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c977cc..af591c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ This file is used to list changes made in each version of the chef-ingredient cookbook. +## 3.5.0 (2022-07-28) + +- Added attribute to specify mixlib-install version, defaults to nil to install latest version - [@stromweld](https://github.com/stromweld) +- Fixed automatev2 resource guard and made it idempotent - [@stromweld](https://github.com/stromweld) +- Updated testing and switched to Github actions for CI pipeline - [@stromweld](https://github.com/stromweld) + ## 3.4.0 (2021-08-05) - Enable `unified_mode` for Chef 17 compatibility - [@detjensrobert](https://github.com/detjensrobert) diff --git a/README.md b/README.md index 2f7831b..8d4eea5 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,13 @@ It will perform component installation and configuration. It provides no recipes - Ubuntu - Debian -- CentOS/RHEL +- CentOS/RHEL/Almalinux/Rockylinux - openSUSE - Amazon Linux ### Chef Infra -- Chef Infra Client 13.0 +- Chef Infra Client 15.3 ### Cookbooks diff --git a/metadata.rb b/metadata.rb index 60ddecc..4a36457 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'cookbooks@chef.io' license 'Apache-2.0' description 'Primitives for managing Chef products and packages' -version '3.4.1' +version '3.5.0' %w(amazon centos redhat scientific oracle fedora debian ubuntu).each do |os| supports os From fd7d06e43c01973ed38d320832884d2d960a544c Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 28 Jul 2022 16:46:10 -0500 Subject: [PATCH 21/22] fix automatev2 debian support Signed-off-by: Corey Hemminger --- CHANGELOG.md | 1 + kitchen.dokken.yml | 2 ++ kitchen.yml | 1 + resources/automatev2.rb | 22 +++++++++++++++---- .../cookbooks/test/recipes/automatev2.rb | 1 + 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af591c2..6d3dd04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This file is used to list changes made in each version of the chef-ingredient co - Added attribute to specify mixlib-install version, defaults to nil to install latest version - [@stromweld](https://github.com/stromweld) - Fixed automatev2 resource guard and made it idempotent - [@stromweld](https://github.com/stromweld) +- Fixed automatev2 resource to work with debian and rhel family bin locations - [@stromweld](https://github.com/stromweld) - Updated testing and switched to Github actions for CI pipeline - [@stromweld](https://github.com/stromweld) ## 3.4.0 (2021-08-05) diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 5061051..0d52809 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -12,6 +12,8 @@ provisioner: name: dokken data_bags_path: test/fixtures/data_bags deprecations_as_errors: true + always_update_cookbooks: true + clean_dokken_sandbox: false client_rb: silence_deprecation_warnings: - chef-25 diff --git a/kitchen.yml b/kitchen.yml index e015c15..8cf0eb5 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -10,6 +10,7 @@ provisioner: name: chef_infra data_bags_path: test/fixtures/data_bags deprecations_as_errors: true + always_update_cookbooks: true retry_on_exit_code: - 213 max_retries: 1 diff --git a/resources/automatev2.rb b/resources/automatev2.rb index baefda9..2004fe2 100644 --- a/resources/automatev2.rb +++ b/resources/automatev2.rb @@ -26,10 +26,15 @@ property :products, Array, default: ['automate'] action :create do + bin_path = value_for_platform_family( + debian: '/bin/chef-automate', + default: '/usr/bin/chef-automate' + ) + execute "curl https://packages.chef.io/files/#{new_resource.channel}/#{new_resource.version}/chef-automate-cli/chef-automate_linux_amd64.zip | gunzip - > chef-automate && chmod +x chef-automate" do cwd '/usr/local/bin' creates '/usr/local/bin/chef-automate' - not_if { FileTest.file?('/usr/bin/chef-automate') } + not_if { FileTest.file?(bin_path) } end ## TODO: add dependancy on sysctl cookbook unless chef-client v14.0+ @@ -44,12 +49,14 @@ execute '/usr/local/bin/chef-automate init-config' do cwd Chef::Config[:file_cache_path] creates "#{Chef::Config[:file_cache_path]}/config.toml" + only_if { FileTest.file?('/usr/local/bin/chef-automate') } end execute "/usr/local/bin/chef-automate deploy #{Chef::Config[:file_cache_path]}/config.toml --product #{new_resource.products.join(' --product ')}#{' --accept-terms-and-mlsa' if new_resource.accept_license}" do cwd Chef::Config[:file_cache_path] + live_stream true only_if { FileTest.file?("#{Chef::Config[:file_cache_path]}/config.toml") } - not_if { FileTest.file?('/usr/bin/chef-automate') && shell_out('/usr/bin/chef-automate service-versions').exitstatus.eql?(0) } + not_if { FileTest.file?(bin_path) && shell_out("#{bin_path} service-versions").exitstatus.eql?(0) } end file "#{Chef::Config[:file_cache_path]}/custom_config.toml" do @@ -59,8 +66,9 @@ execute "chef-automate config patch #{Chef::Config[:file_cache_path]}/custom_config.toml" do cwd Chef::Config[:file_cache_path] + live_stream true action :nothing - only_if { FileTest.file?('/usr/bin/chef-automate') } + only_if { FileTest.file?(bin_path) } end file '/usr/local/bin/chef-automate' do @@ -73,6 +81,11 @@ end action :reconfigure do + bin_path = value_for_platform_family( + debian: '/bin/chef-automate', + default: '/usr/bin/chef-automate' + ) + file "#{Chef::Config[:file_cache_path]}/custom_config.toml" do content new_resource.config notifies :run, "execute[chef-automate config patch #{Chef::Config[:file_cache_path]}/custom_config.toml]", :immediately @@ -80,7 +93,8 @@ execute "chef-automate config patch #{Chef::Config[:file_cache_path]}/custom_config.toml" do cwd Chef::Config[:file_cache_path] + live_stream true action :nothing - only_if { FileTest.file?('/usr/bin/chef-automate') } + only_if { FileTest.file?(bin_path) } end end diff --git a/test/fixtures/cookbooks/test/recipes/automatev2.rb b/test/fixtures/cookbooks/test/recipes/automatev2.rb index 5050e5a..db4af9a 100644 --- a/test/fixtures/cookbooks/test/recipes/automatev2.rb +++ b/test/fixtures/cookbooks/test/recipes/automatev2.rb @@ -3,5 +3,6 @@ [global.v1] fqdn = "chef-automate.example.com" EOS + products %w(automate infra-server builder desktop) accept_license true end From 8ada309caffc321a7193ae851c15fc496b366ea8 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Tue, 2 Aug 2022 11:56:46 -0500 Subject: [PATCH 22/22] fix run_list for default suite Signed-off-by: Corey Hemminger --- kitchen.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 8cf0eb5..6a4b161 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -65,10 +65,7 @@ platforms: suites: - name: default excludes: ['macos-10.12', 'macos-latest', 'windows-2016', 'windows-2019', 'windows-2022'] - named_run_list: - - test_install_git - - test - - test_repo + named_run_list: test_repo - name: local-package-install excludes: ['macos-10.12', 'macos-latest', 'windows-2016', 'windows-2019', 'windows-2022']