1 require 'rspec/core/rake_task'
2 require 'rubocop/rake_task'
4 require 'stove/rake_task'
6 task :'set-pipeline' do
8 "fly -t $CC_TARGET sp -p #{File.basename(Dir.pwd)}-cookbook -c concourse.yml",
9 '-l fly-vars.yml -l ~/sec/credentials-prod.yml',
12 task sp: 'set-pipeline'
15 desc 'Run Ruby style checks'
16 RuboCop::RakeTask.new(:ruby) do |t|
18 '--auto-gen-config', # creates .rubocop_todo.yml
22 desc 'Run Chef style checks'
23 FoodCritic::Rake::LintTask.new(:chef) do |t|
30 desc 'Run all style checks'
31 task style: ['style:chef', 'style:ruby']
33 desc 'Run ChefSpec examples'
34 RSpec::Core::RakeTask.new(:spec)
36 desc 'Publish cookbook'
37 Stove::RakeTask.new(:publish) do |t|
39 # `--username` and `--key` are set in ~/.stove typically.
40 #'--username', 'somebody',
41 #'--key', '~/chef/chef.io.example.com/somebody.pem',
42 #'--endpoint', 'https://supermarket.io.example.com/api/v1', # default: supermarket.chef.io
45 '--log-level', 'info',
49 task default: ['style', 'spec']