Merge pull request #649 from enovance/r10k_check

Rakefile : Verify Puppetfile syntax
This commit is contained in:
Sebastien Badia 2014-10-01 10:53:16 +02:00
commit de6045357d
2 changed files with 10 additions and 3 deletions

View File

@ -9,6 +9,7 @@ group :development, :test do
gem 'rspec'
gem 'json'
gem 'webmock'
gem 'r10k'
end
if puppetversion = ENV['PUPPET_GEM_VERSION']

View File

@ -28,14 +28,20 @@ task(:default).clear
task :default => :test
desc 'Run syntax, lint and spec tests'
task :test => [:syntax,:lint,:spec]
task :test => [:syntax,:lint,:validate_puppetfile,:spec]
desc 'Run syntax, lint and spec tests (without fixture purge = train/airplane)'
task :test_keep => [:syntax,:lint,:spec_prep,:spec_standalone]
task :test_keep => [:syntax,:lint,:validate_puppetfile,:spec_prep,:spec_standalone]
if ENV['COV']
desc 'Run syntax, lint, spec tests and coverage'
task :cov => [:syntax,:lint,:spec_prep,:spec_standalone]
task :cov => [:syntax,:lint,:validate_puppetfile,:spec_prep,:spec_standalone]
end
desc "Validate the Puppetfile syntax"
task :validate_puppetfile do
$stderr.puts "---> syntax:puppetfile"
sh "r10k puppetfile check"
end
namespace :module do