Update testing with new platforms

This commit is contained in:
Tim Smith 2016-04-01 11:52:35 -07:00
parent d560ae593d
commit 110c8a00db
6 changed files with 37 additions and 32 deletions

View File

@ -7,7 +7,21 @@ driver:
privileged: true privileged: true
platforms: platforms:
- name: centos-7.1 - name: centos-5
driver:
image: centos:5
platform: rhel
run_command: /sbin/init
provision_command:
- /usr/bin/yum install -y initscripts net-tools wget
- name: centos-6
driver:
image: centos:6
platform: rhel
run_command: /sbin/init
provision_command:
- /usr/bin/yum install -y initscripts net-tools wget
- name: centos-7
driver: driver:
image: centos:7 image: centos:7
platform: rhel platform: rhel

View File

@ -5,13 +5,17 @@ provisioner:
name: chef_zero name: chef_zero
platforms: platforms:
- name: centos-5.11
- name: centos-6.7 - name: centos-6.7
- name: centos-7.1 - name: centos-7.2
- name: debian-7.8 - name: debian-7.9
run_list: apt::default run_list: apt::default
- name: debian-8.1 - name: debian-8.2
run_list: apt::default run_list: apt::default
- name: fedora-21 - name: fedora-22
run_list: yum::dnf_yum_compat
- name: fedora-23
run_list: yum::dnf_yum_compat
- name: ubuntu-12.04 - name: ubuntu-12.04
run_list: apt::default run_list: apt::default
- name: ubuntu-14.04 - name: ubuntu-14.04

View File

@ -16,17 +16,19 @@ Encoding:
Enabled: false Enabled: false
Style/FileName: Style/FileName:
Enabled: false Enabled: false
Style/Alias:
Enabled: false
Style/SpaceBeforeFirstArg:
Enabled: false
LineLength: LineLength:
Enabled: false Enabled: false
MethodLength: MethodLength:
Enabled: false Enabled: false
Metrics/AbcSize: Metrics/AbcSize:
Enabled: false Enabled: false
PerceivedComplexity: Metrics/ModuleLength:
Enabled: false Enabled: false
SingleSpaceBeforeFirstArg: PerceivedComplexity:
Enabled: false Enabled: false
Style/ClassAndModuleChildren: Style/ClassAndModuleChildren:
Enabled: false Enabled: false
Style/FileName:
Enabled: false

View File

@ -12,9 +12,11 @@ services: docker
env: env:
matrix: matrix:
- INSTANCE=default-ubuntu-1404
- INSTANCE=default-ubuntu-1204 - INSTANCE=default-ubuntu-1204
- INSTANCE=default-centos-71 - INSTANCE=default-ubuntu-1404
- INSTANCE=default-centos-5
- INSTANCE=default-centos-6
- INSTANCE=default-centos-7
# Don't `bundle install` # Don't `bundle install`
install: echo "skip bundle install" install: echo "skip bundle install"
@ -30,6 +32,6 @@ script:
- /opt/chefdk/embedded/bin/rubocop --version - /opt/chefdk/embedded/bin/rubocop --version
- /opt/chefdk/embedded/bin/rubocop - /opt/chefdk/embedded/bin/rubocop
- /opt/chefdk/embedded/bin/foodcritic --version - /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec - /opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any
- /opt/chefdk/embedded/bin/rspec - /opt/chefdk/embedded/bin/rspec
- KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE} - KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}

View File

@ -3,6 +3,7 @@ source 'https://supermarket.chef.io'
metadata metadata
group :integration do group :integration do
cookbook 'yum'
cookbook 'apt' cookbook 'apt'
cookbook 'fake', path: 'test/fixtures/cookbooks/fake' cookbook 'fake', path: 'test/fixtures/cookbooks/fake'
cookbook 'wrapper', path: 'test/fixtures/cookbooks/wrapper' cookbook 'wrapper', path: 'test/fixtures/cookbooks/wrapper'

View File

@ -13,8 +13,7 @@ namespace :style do
desc 'Run Chef style checks' desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t| FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = { t.options = {
fail_tags: ['any'], fail_tags: ['any']
tags: ['~FC005']
} }
end end
end end
@ -35,27 +34,10 @@ namespace :integration do
instance.test(:always) instance.test(:always)
end end
end end
desc 'Run Test Kitchen with cloud plugins'
task :cloud do
run_kitchen = true
if ENV['TRAVIS'] == 'true' && ENV['TRAVIS_PULL_REQUEST'] != 'false'
run_kitchen = false
end
if run_kitchen
Kitchen.logger = Kitchen.default_file_logger
@loader = Kitchen::Loader::YAML.new(project_config: './.kitchen.cloud.yml')
config = Kitchen::Config.new(loader: @loader)
config.instances.each do |instance|
instance.test(:always)
end
end
end
end end
desc 'Run all tests on Travis' desc 'Run all tests on Travis'
task travis: ['style', 'spec', 'integration:cloud'] task travis: ['style', 'spec', 'integration:cloud']
# Default # Default
task default: ['style', 'spec', 'integration:vagrant'] task default: %w(style spec)