Test with Local Delivery instead of Rake
Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
parent
4e4d9d3d5f
commit
d446bfacae
1
.delivery/project.toml
Normal file
1
.delivery/project.toml
Normal file
@ -0,0 +1 @@
|
||||
remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -42,6 +42,8 @@ vendor/
|
||||
.coverage/
|
||||
.zero-knife.rb
|
||||
Policyfile.lock.json
|
||||
Cheffile.lock
|
||||
.librarian/
|
||||
|
||||
# vagrant stuff
|
||||
.vagrant/
|
||||
|
@ -51,7 +51,7 @@ platforms:
|
||||
image: fedora:latest
|
||||
pid_one_command: /usr/lib/systemd/systemd
|
||||
intermediate_instructions:
|
||||
- RUN dnf -y install yum which systemd-sysv initscripts
|
||||
- RUN dnf -y install which systemd-sysv initscripts
|
||||
|
||||
- name: ubuntu-14.04
|
||||
driver:
|
||||
@ -67,13 +67,6 @@ platforms:
|
||||
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 which net-tools
|
||||
|
||||
- name: opensuse-leap
|
||||
driver:
|
||||
image: opensuse:leap
|
@ -32,10 +32,10 @@ before_script:
|
||||
- /opt/chefdk/embedded/bin/cookstyle --version
|
||||
- /opt/chefdk/embedded/bin/foodcritic --version
|
||||
|
||||
script: KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
|
||||
script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- script:
|
||||
- /opt/chefdk/bin/chef exec rake
|
||||
- /opt/chefdk/bin/chef exec delivery local all
|
||||
env: UNIT_AND_LINT=1
|
||||
|
69
Rakefile
69
Rakefile
@ -1,69 +0,0 @@
|
||||
#!/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 #{task.name}" 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 => e
|
||||
puts ">>> Gem load error: #{e}, omitting #{task.name}" 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 #{task.name}" 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 LoadError, StandardError => e
|
||||
puts ">>> Gem load 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)
|
Loading…
x
Reference in New Issue
Block a user