Skip to content

Commit

Permalink
Make chef version configurable and use latest
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Aug 12, 2023
1 parent eac4750 commit 640e16a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
19 changes: 15 additions & 4 deletions .cinc/boxcutter_generator/templates/default/kitchen_dokken.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ driver:
docker_registry: docker.io
chef_image: boxcutter/cinc
chef_version: 17.10.0
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>

provisioner:
name: dokken
product_name: cinc
chef_binary: /opt/cinc/bin/cinc-client
chef_license: accept-no-persist
chef_log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %>

transport:
name: dokken
Expand All @@ -25,13 +27,22 @@ platforms:
driver:
image: boxcutter/dokken-ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: ubuntu-22.04
driver:
image: boxcutter/dokken-ubuntu-22.04
pid_one_command: /bin/systemd

- name: centos-stream-9
driver:
image: boxcutter/dokken-centos-stream-9
pid_one_command: /usr/lib/systemd/systemd

suites:
- name: default
run_list:
- recipe[<%= cookbook_name %>::default]
# run_list set in Policyfile.rb, this does nothing
# run_list:
# - recipe[<%= cookbook_name %>::default]
verifier:
inspec_tests:
- test/integration/default
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ jobs:
with:
omnitruckUrl: omnitruck.cinc.sh
project: cinc-workstation
version: 22.12.1024
version: 23.7.1042
- name: Run Kitchen
working-directory: boxcutter-chef-cookbooks
run: |
kitchen test ${{ matrix.os }}
env:
CHEF_LICENSE: accept-no-persist
CHEF_VERSION: 14.15.6
CHEF_VERSION: 18.2.7
shellcheck:
runs-on: ubuntu-latest
steps:
Expand Down
21 changes: 5 additions & 16 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ driver:
privileged: true # allows systemd services to start
docker_registry: docker.io
chef_image: boxcutter/cinc
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>

provisioner:
name: dokken
product_name: cinc
chef_binary: /opt/cinc/bin/cinc-client
chef_license: accept-no-persist
chef_log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %>

transport:
name: dokken
Expand All @@ -21,40 +23,27 @@ platforms:
driver:
image: boxcutter/dokken-ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: ubuntu-22.04
driver:
image: boxcutter/dokken-ubuntu-22.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: centos-7
driver:
image: boxcutter/dokken-centos-7
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
# stub out /etc/fstab for fb_fstab
- RUN touch /etc/fstab
# enable EPEL (for stuff like hddtemp)
- RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

- name: centos-stream-9
driver:
image: boxcutter/dokken-centos-stream-9
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
# stub out /etc/fstab for fb_fstab
- RUN touch /etc/fstab
# enable EPEL (for stuff like hddtemp)
- RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

suites:
- name: default
run_list:
- recipe[boxcutter_init::default]
# run_list set in Policyfile.rb, this does nothing
# run_list:
# - recipe[boxcutter_init::default]
verifier:
inspec_tests:
- test/integration/default
Expand Down

0 comments on commit 640e16a

Please sign in to comment.