sudo: required
dist: trusty

addons:
  apt:
    sources:
      - chef-stable-trusty
    packages:
      - chefdk

services: docker

env:
  matrix:
    - INSTANCE=default-centos-7
    - INSTANCE=default-centos-6
    - INSTANCE=default-ubuntu-1604
    - INSTANCE=default-ubuntu-1404
    - INSTANCE=default-debian-8

before_script:
  # https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142230889
  - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
  - /opt/chefdk/embedded/bin/chef --version
  - /opt/chefdk/embedded/bin/cookstyle --version
  - /opt/chefdk/embedded/bin/foodcritic --version

script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml kitchen verify ${INSTANCE}

after_script:
  - docker images
  - docker ps -a
  - cat .kitchen/logs/kitchen.log

matrix:
  include:
    - script:
      - bundle install
      - chef exec delivery local all
      env: UNIT_AND_LINT=1

sudo: required
dist: trusty

addons:
  apt:
    sources:
      - chef-stable-trusty
    packages:
      - chefdk=2.4.17-1

services: docker

env:
  matrix:
    - INSTANCE=default-centos-7
    - INSTANCE=default-centos-6
    - INSTANCE=default-ubuntu-1604
    - INSTANCE=default-ubuntu-1404
    - INSTANCE=default-debian-8

before_script:
  # https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142230889
  - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
  - /opt/chefdk/embedded/bin/chef --version
  - /opt/chefdk/embedded/bin/cookstyle --version
  - /opt/chefdk/embedded/bin/foodcritic --version

script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml kitchen verify ${INSTANCE}

after_script:
  - docker images
  - docker ps -a
  - cat .kitchen/logs/kitchen.log

matrix:
  include:
    - script:
      - bundle install
      - chef exec delivery local all
      env: UNIT_AND_LINT=1

Use ChefDK 2.4.17. There is a known bug in ChefDK 2.5.3: YAML aliases in kitchen 1.20.0 (fixed in 1.21)
Use ChefDK 2.4.17. There is a known bug in ChefDK 2.5.3: YAML aliases in kitchen 1.20.0 (fixed in 1.21)

https://github.com/test-kitchen/test-kitchen/issues/1353
