.travis.yml 1.55 KB
Newer Older
1
2
3
rvm: 2.2

sudo: required
Tim Smith's avatar
Tim Smith committed
4
dist: trusty
5
6

# install the pre-release chef-dk.  Use chef-stable-precise to install the stable release
7
8
9
addons:
  apt:
    sources:
10
      - chef-current-precise
11
12
13
    packages:
      - chefdk

14
15
16
17
18
19
services: docker

env:
  matrix:
  - INSTANCE=default-ubuntu-1404
  - INSTANCE=default-ubuntu-1204
Tim Smith's avatar
Tim Smith committed
20
21
  - INSTANCE=default-centos-7
  - INSTANCE=default-centos-6
Tim Smith's avatar
Tim Smith committed
22
23
  - INSTANCE=input-file-provider-ubuntu-1404
  - INSTANCE=input-file-provider-ubuntu-1204
Tim Smith's avatar
Tim Smith committed
24
25
  - INSTANCE=input-file-provider-centos-7
  - INSTANCE=input-file-provider-centos-6
26
27
  - INSTANCE=client-ubuntu-1404
  - INSTANCE=client-ubuntu-1204
Tim Smith's avatar
Tim Smith committed
28
29
  - INSTANCE=client-centos-7
  - INSTANCE=client-centos-6
30
31
  - INSTANCE=server-ubuntu-1404
  - INSTANCE=server-ubuntu-1204
Tim Smith's avatar
Tim Smith committed
32
33
  - INSTANCE=server-centos-7
  - INSTANCE=server-centos-6
34

35
36
37
38
39
# Don't `bundle install`
install: echo "skip bundle install"

# Ensure we make ChefDK's Ruby the default
before_script:
40
41
  # 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 )
42
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
43
  - /opt/chefdk/embedded/bin/chef gem install kitchen-docker
44
script:
45
46
47
48
  - /opt/chefdk/embedded/bin/chef --version
  - /opt/chefdk/embedded/bin/rubocop --version
  - /opt/chefdk/embedded/bin/rubocop
  - /opt/chefdk/embedded/bin/foodcritic --version
Tim Smith's avatar
Tim Smith committed
49
  - /opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any
50
51
  - /opt/chefdk/embedded/bin/rspec
  - KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}