Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing + Chef 12 updates #147

Merged
merged 9 commits into from
Jul 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
*.gem
.zero-knife.rb
*.rbc
.bundle
.config
coverage
InstalledFiles
Expand All @@ -12,7 +9,6 @@ spec/reports
test/tmp
test/version_tmp
tmp
Gemfile.lock
_Store
*~
*#
Expand All @@ -23,9 +19,14 @@ _Store
*.tmp
*.bk
*.bkup

# ruby/bundler files
.ruby-version
.ruby-gemset
.rvmrc
Gemfile.lock
.bundle
*.gem

# YARD artifacts
.yardoc
Expand All @@ -39,6 +40,7 @@ Berksfile.lock
.kitchen.local.yml
vendor/
.coverage/
.zero-knife.rb

#vagrant stuff
.vagrant/
Expand Down
107 changes: 85 additions & 22 deletions .kitchen.docker.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,100 @@
settings:
parallel: true

driver:
name: docker
# privileged is required otherwise the container doesn't boot right
privileged: true
name: dokken
chef_version: latest
privileged: true # because Docker and SystemD/Upstart

transport:
name: dokken

provisioner:
name: dokken

verifier:
name: inspec
format: doc

platforms:
- name: centos-7.1
- 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 lsb-release -y

- name: debian-8
driver:
image: debian:8
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install lsb-release -y

- name: centos-5
driver:
image: centos:5
platform: rhel
pid_one_command: /sbin/init
intermediate_instructions:
- RUN yum install -y which initscripts

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

- name: centos-7
driver:
image: centos:7
platform: rhel
run_command: /usr/lib/systemd/systemd
provision_command:
- /bin/yum install -y initscripts net-tools wget
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum -y install lsof which systemd-sysv initscripts

- name: fedora-latest
driver:
image: fedora:latest
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN dnf -y install yum which systemd-sysv initscripts

- name: ubuntu-12.04
driver:
image: ubuntu-upstart:12.04
platform: ubuntu
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: ubuntu-14.04
driver:
image: ubuntu-upstart:14.04
platform: ubuntu
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: ubuntu-16.04
driver:
image: ubuntu:16.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: opensuse-13.2
driver:
image: opensuse:13.2
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive

- name: opensuse-42.1
driver:
image: opensuse:42.1
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive

suites:
- name: system_ruby
Expand Down
21 changes: 12 additions & 9 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
driver:
name: vagrant

provisioner:
name: chef_zero

platforms:
- name: ubuntu-12.04
run_list:
- recipe[apt]
- name: ubuntu-14.04
run_list:
- recipe[apt]
- name: centos-6.7
- name: centos-7.1
- name: centos-5.11
- name: centos-6.7
- name: centos-7.2
- name: ubuntu-12.04
run_list: apt::default
- name: ubuntu-14.04
run_list: apt::default
- name: ubuntu-16.04
run_list: apt::default

suites:
- name: system_ruby
Expand Down
36 changes: 0 additions & 36 deletions .rubocop.yml

This file was deleted.

31 changes: 18 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
rvm: 2.2

sudo: required
dist: trusty

# install the pre-release chef-dk. Use chef-stable-precise to install the stable release
addons:
Expand All @@ -10,28 +9,34 @@ addons:
packages:
- chefdk

# Don't `bundle install` which takes about 1.5 mins
install: echo "skip bundle install"

branches:
only:
- master

services: docker

env:
matrix:
- INSTANCE=system-ruby-ubuntu-1404
- INSTANCE=system-ruby-ubuntu-1204
- INSTANCE=system-ruby-centos-71
- INSTANCE=system-ruby-centos-6
- INSTANCE=system-ruby-centos-7
- INSTANCE=system-ruby-ubuntu-1204
- INSTANCE=system-ruby-ubuntu-1404
- INSTANCE=system-ruby-ubuntu-1604

# Don't `bundle install`
install: echo "skip bundle install"
fast_finish: true

# Ensure we make ChefDK's Ruby the default
before_script:
# 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 )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
- /opt/chefdk/embedded/bin/chef gem install kitchen-docker

script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/rubocop --version
- /opt/chefdk/embedded/bin/rubocop
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/cookstyle
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any -P
- /opt/chefdk/embedded/bin/rspec
- KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
47 changes: 13 additions & 34 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
source 'https://rubygems.org'

group :rake do
gem 'rake'
end

group :lint do
gem 'foodcritic', '~> 5.0'
gem 'rubocop', '~> 0.34'
end

group :unit do
gem 'berkshelf', '~> 4.0'
gem 'chefspec', '~> 4.4'
end

group :kitchen_common do
gem 'test-kitchen', '~> 1.4'
end

group :kitchen_vagrant do
gem 'kitchen-vagrant', '~> 0.19'
end

group :kitchen_cloud do
gem 'kitchen-digitalocean'
gem 'kitchen-ec2'
gem 'kitchen-docker'
end

group :development do
gem 'guard'
gem 'guard-rspec'
gem 'guard-rubocop'
gem 'emeril'
end
gem 'berkshelf', '>= 4.3'
gem 'chefspec', '~> 4.6'
gem 'cookstyle'
gem 'foodcritic', '~> 7.0'
gem 'kitchen-dokken'
gem 'kitchen-inspec', '>= 0.14'
gem 'kitchen-vagrant', '>= 0.20'
gem 'rake'
gem 'stove'
gem 'test-kitchen', '>= 1.10'
gem 'guard'
gem 'guard-rspec'
gem 'guard-rubocop'