From 6f7e4965632556374a527fa004c65e786ad1b51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20So=CC=88derberg?= Date: Thu, 11 Aug 2016 21:18:46 +0200 Subject: [PATCH 1/5] Test Chef 12 using Docker on Travis --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 83357818..3f2f63ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,10 @@ matrix: - rvm: 1.9 gemfile: gemfiles/chef-11/Gemfile script: bundle exec rspec spec + - rvm: 2.1 + sudo: required + services: + - docker + env: CHEF_VERSION=12 KITCHEN_YAML=.kitchen.docker.yml + script: bundle exec kitchen test --destroy=always + install: travis_wait bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle} From 0bc7d05efb098fcb26959ee63804b757a42db329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20S=C3=B6derberg?= Date: Thu, 11 Aug 2016 23:18:22 +0200 Subject: [PATCH 2/5] Tweak provision commands for Docker containers --- .kitchen.docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.kitchen.docker.yml b/.kitchen.docker.yml index 72f8316b..332c90fe 100644 --- a/.kitchen.docker.yml +++ b/.kitchen.docker.yml @@ -43,7 +43,7 @@ platforms: - name: centos-6.4 driver_config: provision_command: - - yum install -y tar java-1.7.0-openjdk java-1.7.0-openjdk-devel + - yum install -y tar java-1.7.0-openjdk - curl -L https://chef.io/chef/install.sh | bash -s -- -v <%= ENV.fetch('CHEF_VERSION', '11.16.4') %> - name: debian-7.4 driver_config: @@ -53,7 +53,7 @@ platforms: - name: ubuntu-14.04 driver_config: provision_command: - - apt-get install -y openjdk-7-jre-headless + - apt-get install -y default-jre-headless - curl -L https://chef.io/chef/install.sh | bash -s -- -v <%= ENV.fetch('CHEF_VERSION', '11.16.4') %> suites: - name: default From 31c12daf0434517b030ef727fe575ba616ea5a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20S=C3=B6derberg?= Date: Thu, 11 Aug 2016 23:32:45 +0200 Subject: [PATCH 3/5] Always use `travis_wait` when installing deps. Compiling native extensions take forever for some dependencies. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f2f63ea..52bed6e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ language: ruby -script: bundle exec rake test sudo: false cache: - bundler rvm: - 2.1 +install: travis_wait bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle} +script: bundle exec rake test matrix: fast_finish: true include: @@ -17,4 +18,3 @@ matrix: - docker env: CHEF_VERSION=12 KITCHEN_YAML=.kitchen.docker.yml script: bundle exec kitchen test --destroy=always - install: travis_wait bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle} From c890b35a0bae3d44c092f77fa96ae88368841354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20S=C3=B6derberg?= Date: Thu, 11 Aug 2016 23:33:06 +0200 Subject: [PATCH 4/5] Run kitchen tests in parallel --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 52bed6e8..1a67a43f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,4 @@ matrix: services: - docker env: CHEF_VERSION=12 KITCHEN_YAML=.kitchen.docker.yml - script: bundle exec kitchen test --destroy=always + script: bundle exec kitchen test --concurrency=3 --destroy=always From 2e5f0c963c69ac85089912ed5eb9a49afb8fd63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20S=C3=B6derberg?= Date: Thu, 11 Aug 2016 23:33:36 +0200 Subject: [PATCH 5/5] Test Chef 11 as well --- .travis.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a67a43f..738ae069 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,28 @@ language: ruby -sudo: false +sudo: required +services: + - docker cache: - bundler rvm: - 2.1 +env: + global: + - KITCHEN_YAML=.kitchen.docker.yml + matrix: + - CHEF_VERSION=11 + - CHEF_VERSION=12 install: travis_wait bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle} -script: bundle exec rake test +script: bundle exec kitchen test --concurrency=3 --destroy=always matrix: fast_finish: true include: - - rvm: 1.9 + - sudo: false + env: [] + rvm: 2.1 + script: bundle exec rake test + - sudo: false + env: [] + rvm: 1.9 gemfile: gemfiles/chef-11/Gemfile script: bundle exec rspec spec - - rvm: 2.1 - sudo: required - services: - - docker - env: CHEF_VERSION=12 KITCHEN_YAML=.kitchen.docker.yml - script: bundle exec kitchen test --concurrency=3 --destroy=always