Skip to content

Instantly share code, notes, and snippets.

@fernandoaleman
Last active November 9, 2018 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandoaleman/fe277f7eb8c3fb6c7dfec5de8f85edda to your computer and use it in GitHub Desktop.
Save fernandoaleman/fe277f7eb8c3fb6c7dfec5de8f85edda to your computer and use it in GitHub Desktop.
Sample chef cookbook .travis.yml file
sudo: required
dist: trusty
addons:
apt:
sources:
- chef-current-trusty
packages:
- chefdk
install: echo "skip bundle install"
branches:
only:
- master
services: docker
env:
matrix:
- INSTANCE=test-centos-6
- INSTANCE=test-centos-7
- INSTANCE=test-ubuntu-1404
- INSTANCE=test-ubuntu-1604
- INSTANCE=test-ubuntu-1804
before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
- chef --version
- cookstyle --version
- 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:
- delivery local verify
env: UNIT_AND_LINT=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment