Commit 91b9ad94 authored by Tim Smith's avatar Tim Smith
Browse files

Update kitchen configs and use delivery local mode instead of Rake


Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent a5a5de92
remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"
......@@ -8,6 +8,7 @@ transport:
provisioner:
name: dokken
deprecations_as_errors: true
verifier:
name: inspec
......@@ -19,7 +20,7 @@ platforms:
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https net-tools -y
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y
- name: debian-8
driver:
......@@ -27,7 +28,7 @@ platforms:
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https net-tools -y
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y
- name: centos-6
driver:
......@@ -35,7 +36,7 @@ platforms:
platform: rhel
pid_one_command: /sbin/init
intermediate_instructions:
- RUN yum -y install tar which initscripts
- RUN yum -y install lsof which initscripts net-tools wget net-tools
- name: centos-7
driver:
......@@ -43,15 +44,14 @@ platforms:
platform: rhel
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum clean all
- RUN yum -y install net-tools lsof
- RUN yum -y install lsof which systemd-sysv initscripts wget net-tools
- name: fedora-latest
driver:
image: fedora:latest
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN dnf -y install tar yum
- RUN dnf -y install which systemd-sysv initscripts wget net-tools
- name: ubuntu-14.04
driver:
......@@ -59,7 +59,7 @@ platforms:
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https net-tools -y
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y
- name: ubuntu-16.04
driver:
......@@ -67,14 +67,14 @@ platforms:
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https net-tools -y
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y
- name: opensuse-leap
driver:
image: opensuse:leap
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive
- RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive which net-tools
suites:
- name: default
......
......@@ -3,6 +3,7 @@ driver:
provisioner:
name: chef_zero
deprecations_as_errors: true
platforms:
- name: centos-6.8
......@@ -12,8 +13,7 @@ platforms:
- name: debian-8.6
run_list: apt::default
- name: fedora-25
- name: opensuse-13.2
- name: opensuse-leap-42.2
- name: opensuse-leap-42.1
- name: ubuntu-14.04
run_list: apt::default
- name: ubuntu-16.04
......
sudo: required
dist: trusty
# install the pre-release chef-dk. Use chef-stable-trusty to install the stable release
addons:
apt:
sources:
......@@ -65,5 +64,5 @@ script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen
matrix:
include:
- script:
- /opt/chefdk/bin/chef exec rake
- /opt/chefdk/bin/chef exec delivery local all
env: UNIT_AND_LINT=1
#!/usr/bin/env rake
require_relative 'tasks/maintainers'
# Style tests. cookstyle (rubocop) and Foodcritic
namespace :style do
begin
require 'cookstyle'
require 'rubocop/rake_task'
desc 'Run Ruby style checks'
RuboCop::RakeTask.new(:ruby)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting style:ruby" unless ENV['CI']
end
begin
require 'foodcritic'
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = {
fail_tags: ['any'],
progress: true,
}
end
rescue LoadError
puts ">>> Gem load error: #{e}, omitting style:chef" unless ENV['CI']
end
end
desc 'Run all style checks'
task style: ['style:chef', 'style:ruby']
# ChefSpec
begin
require 'rspec/core/rake_task'
desc 'Run ChefSpec examples'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting spec" unless ENV['CI']
end
# Integration tests. Kitchen.ci
namespace :integration do
begin
require 'kitchen/rake_tasks'
desc 'Run kitchen integration tests'
Kitchen::RakeTasks.new
rescue StandardError => e
puts ">>> Kitchen error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
namespace :supermarket do
begin
require 'stove/rake_task'
desc 'Publish cookbook to Supermarket with Stove'
Stove::RakeTask.new
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
# Default
task default: %w(style spec)
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