Merge pull request #649 from enovance/r10k_check
Rakefile : Verify Puppetfile syntax
This commit is contained in:
commit
de6045357d
1
Gemfile
1
Gemfile
@ -9,6 +9,7 @@ group :development, :test do
|
|||||||
gem 'rspec'
|
gem 'rspec'
|
||||||
gem 'json'
|
gem 'json'
|
||||||
gem 'webmock'
|
gem 'webmock'
|
||||||
|
gem 'r10k'
|
||||||
end
|
end
|
||||||
|
|
||||||
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
||||||
|
12
Rakefile
12
Rakefile
@ -28,14 +28,20 @@ task(:default).clear
|
|||||||
task :default => :test
|
task :default => :test
|
||||||
|
|
||||||
desc 'Run syntax, lint and spec tests'
|
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)'
|
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']
|
if ENV['COV']
|
||||||
desc 'Run syntax, lint, spec tests and coverage'
|
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
|
end
|
||||||
|
|
||||||
namespace :module do
|
namespace :module do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user