From 467ee4545609a3eecb72c2174a2850a81a3d95b1 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Tue, 6 Oct 2015 09:59:26 -0500 Subject: [PATCH] Add integration task Add missing gate integration task, but use the one from Common cookbook to make future updates easy. Change-Id: I3682934a800af32b6966d21b5b942799aae700bc --- Rakefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Rakefile b/Rakefile index ce29baa..ee40f9a 100644 --- a/Rakefile +++ b/Rakefile @@ -2,29 +2,44 @@ task default: ["test"] task :test => [:lint, :style, :knife, :unit] +desc "Vendor the cookbooks in the Berksfile" task :berks_prep do sh %{chef exec berks vendor} end +desc "Run FoodCritic (lint) tests" task :lint do sh %{chef exec foodcritic --epic-fail any --tags ~FC003 --tags ~FC023 .} end +desc "Run knife tests" task :knife => :berks_prep do sh %{chef exec knife cookbook test openstack-integration-test -o berks-cookbooks} end +desc "Run RuboCop (style) tests" task :style do sh %{chef exec rubocop} end +desc "Run RSpec (unit) tests" task :unit => :berks_prep do sh %{chef exec rspec --format documentation} end +desc "Remove the berks-cookbooks directory and the Berksfile.lock" task :clean do rm_rf [ 'berks-cookbooks', 'Berksfile.lock' ] 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 +