Commit 3f53c55f authored by Christopher Huhn's avatar Christopher Huhn 🥚
Browse files

Copy and adapt travis environment from sys cookbook

parent 9adb7592
---
driver:
name: docker
privileged: true
provision_command:
# https://github.com/test-kitchen/kitchen-docker/issues/285:
- mkdir -p /run/sshd
- apt-get -qq -y install chef || true
- apt-get -qq -y install exim4-base || true
- apt-get -qq -y install shellcheck || true
require_chef_omnibus: false
provisioner:
log_level: warn
platforms:
- name: debian-stretch
- name: debian-jessie
- name: debian-wheezy
# wheezy chef package is 10.12
driver:
require_chef_omnibus: 12.0.3
- name: debian-buster
- name: debian-bullseye
- name: ubuntu-18.04
- name: centos-7
driver:
require_chef_omnibus: 14
provision_command:
- yum install -y rubygems
---
language: ruby
cache: bundler
sudo: required
dist: xenial
services: docker
# bundler in the travis image is too old:
before_install:
- gem install bundler
bundler_args: --without vagrant
before_script:
- bundle exec kitchen list
env:
global:
- KITCHEN_LOCAL_YAML=.kitchen.docker.yml
matrix:
- CHEF_VERSION=12.3
- CHEF_VERSION=12.14
- CHEF_VERSION=13
- CHEF_VERSION=14
rvm:
# - system # does not work with `gem install bundler`
- 2.3
- 2.5
matrix:
exclude:
- rvm: 2.3
env: CHEF_VERSION=14
stages:
- rubocop
- foodcritic
- test
- kitchen
# this is the script for the test stage, where the matrix is expanded
script: bundle exec rake chefspec
jobs:
fast_finish: true
include:
- stage: rubocop
script: bundle exec rake rubocop
- stage: foodcritic
script: bundle exec rake foodcritic
- stage: kitchen
env: KITCHEN_PLATFORM=debian-stretch
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=debian-jessie
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=debian-buster
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=debian-wheezy
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=ubuntu-18.04
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=centos-7
script: bundle exec kitchen test $KITCHEN_PLATFORM
allow_failures:
- rvm: 2.4
- env: CHEF_VERSION=14
- env: CHEF_VERSION=13
- env: KITCHEN_PLATFORM=centos-7
- stage: test
source 'http://rubygems.org'
group :development do
gem 'rake'
gem 'rubocop' #, '~> 0.49'
# Foodcritic 13 drops Chef 12 compatibility:
gem 'foodcritic', '< 13'
# Newer versions break foodcritic:
# https://github.com/Foodcritic/foodcritic/commit/28f6684
gem 'cucumber-core', '>= 1.3', '< 4.0'
gem 'berkshelf'
# take Chef version from environment, fall back to newest version:
gem 'chef', (ENV['CHEF_VERSION']) ? "~> #{ENV['CHEF_VERSION']}" : "< 15"
gem 'chefspec', '< 7.2'
gem 'chefspec-ohai'
# test-kitchen pulls Chef's crappy license-acceptance gem
gem 'test-kitchen', '< 2.2'
# gem 'guard-rspec', require: false
# gem 'libnotify'
# gem "serverspec"
end
group :travis do
gem 'kitchen-docker'
end
group :vagrant do
gem 'vagrant'
gem 'kitchen-vagrant'
gem 'vagrant-libvirt'
gem 'vagrant-berkshelf'
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment