Skip to content

Commit

Permalink
Update travis.yml configuration for kitchen-dokken.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Bellone committed Jul 19, 2016
1 parent 36e7d70 commit eb7f3f6
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 33 deletions.
8 changes: 0 additions & 8 deletions .gitattributes

This file was deleted.

12 changes: 10 additions & 2 deletions .kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ provisioner:

platforms:
- name: centos-7
named_run_list: rhel
named_run_list: centos
driver:
image: centos:7
platform: rhel
Expand All @@ -21,7 +21,7 @@ platforms:
- RUN yum clean all
- RUN yum -y install net-tools lsof
- name: centos-6
named_run_list: rhel
named_run_list: centos
driver:
image: centos:6
platform: rhel
Expand All @@ -32,6 +32,14 @@ platforms:
named_run_list: debian
driver:
image: ubuntu:16.04
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https net-tools -y
- name: ubuntu-14.04
named_run_list: debian
driver:
image: ubuntu:14.04
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
Expand Down
6 changes: 3 additions & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ platforms:
- name: ubuntu-12.04
named_run_list: debian
- name: centos-7.2
named_run_list: rhel
named_run_list: centos
- name: centos-6.7
named_run_list: rhel
named_run_list: centos
- name: centos-5.11
named_run_list: rhel
named_run_list: centos
- name: debian-8.2
named_run_list: debian
- name: debian-7.9
Expand Down
2 changes: 0 additions & 2 deletions .rspec

This file was deleted.

6 changes: 4 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
AllCops:
Exclude:
- 'Guardfile'
- 'Rakefile'
- 'Vagrantfile'
- 'Policyfile.rb'
- 'Berksfile'
- 'Thorfile'
- 'Gemfile'
- 'metadata.rb'
- 'test/**/*'
Expand Down Expand Up @@ -44,3 +42,7 @@ Style/PercentLiteralDelimiters:
Enabled: false
Style/ModuleFunction:
Enabled: false
Style/AlignHash:
Enabled: false
Style/SpaceInsideHashLiteralBraces:
Enabled: false
50 changes: 36 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
---
language: ruby
cache: bundler
sudo: required
dist: trusty
language: generic
services:
- docker
cache: bundler
addons:
apt:
sources:
- chef-current-trusty
packages:
- chefdk
services: docker
env:
global:
KITCHEN_LOCAL_YAML: .kitchen.docker.yml
matrix:
- INSTANCE=default-centos-7
- INSTANCE=default-centos-6
- INSTANCE=default-ubuntu-1604
- INSTANCE=default-ubuntu-1404
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 gem install kitchen-dokken
- /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: /opt/chefdk/embedded/bin/cookstyle
env: COOKSTYLE=1
- script: /opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any
env: FOODCRITIC=1
- script:
- bundle install
- /opt/chefdk/embedded/bin/rspec --color --default-path test/spec
env: CHEFSPEC=1
notifications:
slack: bloomberg-rnd:BvYmxrV9xj902XWTRNrkLNkR
install:
- curl https://chef.io/chef/install.sh | sudo bash -s -- -P chefdk
- chef gem install kitchen-docker
script:
- bundle exec rake travis
- docker version
- kitchen --version
- kitchen test -d always
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#

module ConsulCookbook
module Helpers # rubocop:disable Metrics/ModuleLength
module Helpers
include Chef::Mixin::ShellOut

extend self
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/policies/_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
default_source :chef_repo, '..'
cookbook 'consul', path: '../../..'
run_list 'consul::default', "consul_spec::#{name}"
named_run_list :rhel, 'yum::default', run_list
named_run_list :centos, 'yum::default', run_list
named_run_list :debian, 'apt::default', run_list
named_run_list :freebsd, 'freebsd::default', run_list
named_run_list :windows, 'windows::default', run_list

0 comments on commit eb7f3f6

Please sign in to comment.