---
dist: trusty
sudo: required
services: docker
addons:
  apt:
    sources:
      - chef-stable-trusty
    packages:
      - chefdk

cache:
  apt: true

env:
  matrix:
    - INSTANCE=centos-7
    - INSTANCE=ubuntu-1604

matrix:
  fast_finish: true
  allow_failures:
    - env: INSTANCE=ubuntu-1604

before_install:
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
  - chef --version
  - docker --version

# We are using ChefDK so no gem install required.
# https://docs.travis-ci.com/user/customizing-the-build#Skipping-the-Installation-Step
install: true

script:
  - KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
  # TODO: add rubocop/cookstyle and foocritic checks

---
dist: trusty
sudo: required
services: docker
addons:
  apt:
    sources:
      - chef-stable-trusty
    packages:
      - chefdk

cache:
  apt: true

env:
  global:
    - KITCHEN_LOCAL_YAML=.kitchen.dokken.yml
  matrix:
    - INSTANCE=centos-7
    - INSTANCE=ubuntu-1604

matrix:
  fast_finish: true
  allow_failures:
    - env: INSTANCE=ubuntu-1604

before_install:
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
  - chef --version
  - docker --version

# We are using ChefDK so no gem install required.
# https://docs.travis-ci.com/user/customizing-the-build#Skipping-the-Installation-Step
install: true

script:
  - kitchen verify ${INSTANCE}
  # TODO: add rubocop/cookstyle and foocritic checks

Make use of global env vars for Kitchen
Make use of global env vars for Kitchen

Also, avoid using an absolute path where unnecessary
