Skip to content

Commit

Permalink
Test in Travis with kitchen-dokken (#46)
Browse files Browse the repository at this point in the history
- Kitchen-dokken support
- remove the need for the yum cookbook since we have built in DNF support in Chef 12.18 now.

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 authored and damacus committed Jan 26, 2017
1 parent d9fb3d7 commit 5ea3a39
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 21 deletions.
14 changes: 10 additions & 4 deletions .kitchen.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@ transport:

provisioner:
name: dokken
data_bags_path: test/fixtures/data_bags

verifier:
name: inspec

platforms:
- name: debian-7
driver:
image: debian:7
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y

- name: debian-8
driver:
image: debian:8
Expand All @@ -22,14 +29,13 @@ platforms:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y


- name: centos-6
driver:
image: centos:6
platform: rhel
pid_one_command: /sbin/init
intermediate_instructions:
- RUN yum -y install which initscripts net-tools wget
- RUN yum -y install lsof which initscripts net-tools wget net-tools

- name: centos-7
driver:
Expand Down Expand Up @@ -82,7 +88,7 @@ platforms:
image: opensuse:leap
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive which hostname
- RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive which net-tools

suites:
- name: client
Expand Down
14 changes: 6 additions & 8 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ verifier:

platforms:
- name: centos-6.8
- name: oracle-6.8

- name: centos-7.3
- name: oracle-7.3

- name: debian-7.11
- name: debian-8.6
- name: fedora-25
run_list: yum::dnf_yum_compat

- name: opensuse-13.2
- name: opensuse-leap-42.1
- name: oracle-6.8
- name: oracle-7.3
- name: ubuntu-12.04
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: debian-7.11
- name: debian-8.6

suites:
- name: client
Expand Down
36 changes: 29 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Use Travis's cointainer based infrastructure
sudo: false
sudo: required
dist: trusty

# install the pre-release chef-dk. Use chef-stable-trusty to install the stable release
addons:
apt:
sources:
- chef-current-trusty
- chef-stable-trusty
packages:
- chefdk

Expand All @@ -14,12 +16,32 @@ branches:
only:
- master

# Ensure we make ChefDK's Ruby the default
services: docker

env:
matrix:
- INSTANCE=client-centos-6
- INSTANCE=client-centos-7
- INSTANCE=client-ubuntu-1204
- INSTANCE=client-ubuntu-1404
- INSTANCE=client-ubuntu-1604
- INSTANCE=server-centos-6
- INSTANCE=server-centos-7
- INSTANCE=server-ubuntu-1204
- INSTANCE=server-ubuntu-1404
- INSTANCE=server-ubuntu-1604

before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"

script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/bin/chef exec rake

script: KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}

matrix:
include:
- script:
- /opt/chefdk/bin/chef exec rake
env: UNIT_AND_LINT=1
3 changes: 1 addition & 2 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ source 'https://supermarket.chef.io'
metadata

group :integration do
cookbook 'test', path: './test/fixtures/cookbooks/test'
cookbook 'yum'
cookbook 'test', path: 'test/fixtures/cookbooks/test'
end

0 comments on commit 5ea3a39

Please sign in to comment.