Skip to content

Commit

Permalink
Run integration testing in Travis with dokken
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Aug 15, 2017
1 parent dde7374 commit 94e6925
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 7 deletions.
75 changes: 75 additions & 0 deletions .kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -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
32 changes: 25 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,44 @@

sudo: required
dist: trusty
sudo: false

addons:
apt:
sources:
- chef-current-trusty
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

0 comments on commit 94e6925

Please sign in to comment.