Skip to content

Commit a5112bf

Browse files
committed
Travis CI: Install Chef DK
1 parent b7797bb commit a5112bf

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.travis.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,25 @@ rvm:
22
- 2.2
33
- 2.3
44

5-
sudo: false
5+
sudo: required
6+
7+
services: docker
68

79
env:
810
- CHEF_VERSION="~> 12.0"
911

10-
bundler_args: --without doc integration integration_cloud guard
11-
script: travis_retry bundle exec rake style unit
12+
before_install:
13+
- chef --version &> /dev/null || curl -L https://www.getchef.com/chef/install.sh | sudo bash -s -- -P chefdk -v 1.2.22
14+
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
15+
16+
install:
17+
- chef exec bundle install --jobs=3 --retry=3 --without='doc integration_vagrant integration_cloud guard'
18+
19+
before_script:
20+
# https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142455888
21+
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
22+
- chef --version
23+
- cookstyle --version
24+
- foodcritic --version
25+
26+
script: travis_retry chef exec bundle exec rake style unit

0 commit comments

Comments
 (0)