diff --git a/.kitchen.dokken.yml b/.kitchen.dokken.yml new file mode 100644 index 00000000..0a1a7074 --- /dev/null +++ b/.kitchen.dokken.yml @@ -0,0 +1,75 @@ +driver: + name: dokken + privileged: true # because Docker and SystemD/Upstart + chef_version: <%= ENV['CHEF_VERSION'] || 'current' %> + +transport: + name: dokken + +provisioner: + name: dokken + deprecations_as_errors: true + +verifier: + name: inspec + +platforms: +- name: amazonlinux + driver: + image: dokken/amazonlinux + pid_one_command: /sbin/init + +- name: debian-7 + driver: + image: dokken/debian-7 + pid_one_command: /sbin/init + intermediate_instructions: + - RUN /usr/bin/apt-get update + +- name: debian-8 + driver: + image: dokken/debian-8 + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update + +- name: debian-9 + driver: + image: dokken/debian-9 + pid_one_command: /bin/systemd + 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 + pid_one_command: /usr/lib/systemd/systemd + +- name: fedora-latest + driver: + image: dokken/fedora-latest + pid_one_command: /usr/lib/systemd/systemd + +- name: ubuntu-14.04 + driver: + image: dokken/ubuntu-14.04 + pid_one_command: /sbin/init + intermediate_instructions: + - RUN /usr/bin/apt-get update + +- name: ubuntu-16.04 + driver: + image: dokken/ubuntu-16.04 + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update + +- name: opensuse-leap + driver: + image: dokken/opensuse-leap + pid_one_command: /bin/systemd \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 14d70f4f..f1d19665 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ - +sudo: required dist: trusty -sudo: false + addons: apt: sources: @@ -8,19 +8,37 @@ addons: packages: - chefdk -# Don't `bundle install` +# Don't `bundle install` which takes about 1.5 mins install: echo "skip bundle install" branches: only: - master -# Ensure we make ChefDK's Ruby the default +services: docker + +env: + matrix: + - INSTANCE=append-centos-6 + - INSTANCE=append-centos-7 + - INSTANCE=append-ubuntu-1404 + - INSTANCE=append-ubuntu-1604 + - INSTANCE=create-centos-6 + - INSTANCE=create-centos-7 + - INSTANCE=create-ubuntu-1404 + - INSTANCE=create-ubuntu-1604 + before_script: + - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - eval "$(chef shell-init bash)" - -script: - chef --version - cookstyle --version - foodcritic --version - - chef exec rake + +script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml kitchen verify ${INSTANCE} + +matrix: + include: + - script: + - chef exec delivery local all + env: UNIT_AND_LINT=1