Add integration task

Add missing gate integration task, but use the one from
Common cookbook to make future updates easy.

Change-Id: I73b96a211c4da5755099c7852d6957a50ff0e8f7
This commit is contained in:
Mark Vanderwiel 2015-10-06 09:51:10 -05:00
parent 49c1a11b8b
commit 9fe64485f5
1 changed files with 14 additions and 0 deletions

View File

@ -2,25 +2,39 @@ task default: ["test"]
task :test => [:lint, :style, :unit] task :test => [:lint, :style, :unit]
desc "Vendor the cookbooks in the Berksfile"
task :berks_prep do task :berks_prep do
sh %{chef exec berks vendor} sh %{chef exec berks vendor}
end end
desc "Run FoodCritic (lint) tests"
task :lint do task :lint do
sh %{chef exec foodcritic --epic-fail any --tags ~FC003 --tags ~FC023 .} sh %{chef exec foodcritic --epic-fail any --tags ~FC003 --tags ~FC023 .}
end end
desc "Run RuboCop (style) tests"
task :style do task :style do
sh %{chef exec rubocop} sh %{chef exec rubocop}
end end
desc "Run RSpec (unit) tests"
task :unit => :berks_prep do task :unit => :berks_prep do
sh %{chef exec rspec --format documentation} sh %{chef exec rspec --format documentation}
end end
desc "Remove the berks-cookbooks directory and the Berksfile.lock"
task :clean do task :clean do
rm_rf [ rm_rf [
'berks-cookbooks', 'berks-cookbooks',
'Berksfile.lock' 'Berksfile.lock'
] ]
end end
desc "All-in-One Neutron build Infra using Common task"
task :integration do
# Use the common integration task
sh %(wget -nv -t 3 -O Rakefile-Common https://raw.githubusercontent.com/openstack/cookbook-openstack-common/master/Rakefile)
load './Rakefile-Common'
Rake::Task["common_integration"].invoke
end