ops-messaging refactor for Pike and Chef 13

- implemented foodcritic and cookstyle corrections
- deprecated node.foo.bar method access for node['foo']['bar'] bracket access
- updated for the most recent upstream rabbitmq cookbook

Implements blueprint modern-chef

Change-Id: If971a472c1fd9149a891200548a267655620fce2
Depends-On: I143e0ed0a2bdd76269fc0c402052696426d96d81
This commit is contained in:
Samuel Cassiba
2017-11-27 00:09:44 -08:00
parent 77aad815f7
commit d41044ce64
7 changed files with 216 additions and 65 deletions

View File

@@ -1,40 +1,39 @@
task default: ["test"]
task default: ['test']
task :test => [:syntax, :lint, :unit]
task test: [:syntax, :lint, :unit]
desc "Vendor the cookbooks in the Berksfile"
desc 'Vendor the cookbooks in the Berksfile'
task :berks_prep do
sh %{chef exec berks vendor}
sh %(chef exec berks vendor)
end
desc "Run FoodCritic (syntax) tests"
desc 'Run FoodCritic (syntax) tests'
task :syntax do
sh %{chef exec foodcritic --exclude spec -f any .}
sh %(chef exec foodcritic --exclude spec -f any .)
end
desc "Run RuboCop (lint) tests"
desc 'Run RuboCop (lint) tests'
task :lint do
sh %{chef exec cookstyle}
sh %(chef exec cookstyle)
end
desc "Run RSpec (unit) tests"
task :unit => :berks_prep do
sh %{chef exec rspec --format documentation}
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"
desc 'Remove the berks-cookbooks directory and the Berksfile.lock'
task :clean do
rm_rf [
'berks-cookbooks',
'Berksfile.lock'
'Berksfile.lock',
]
end
desc "All-in-One Neutron build Infra using Common task"
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
Rake::Task['common_integration'].invoke
end