Add checks to rake validate
and update Travis
This commit is contained in:
parent
7c378d0e8b
commit
96d38fb876
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
env:
|
env:
|
||||||
- PUPPET_VERSION=2.7.23
|
- PUPPET_VERSION=2.7.23
|
||||||
- PUPPET_VERSION=3.2.4
|
- PUPPET_VERSION=3.3.2
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
rvm:
|
rvm:
|
||||||
|
12
Rakefile
12
Rakefile
@ -2,11 +2,17 @@ require 'rubygems'
|
|||||||
require 'puppetlabs_spec_helper/rake_tasks'
|
require 'puppetlabs_spec_helper/rake_tasks'
|
||||||
require 'puppet-lint/tasks/puppet-lint'
|
require 'puppet-lint/tasks/puppet-lint'
|
||||||
PuppetLint.configuration.send('disable_80chars')
|
PuppetLint.configuration.send('disable_80chars')
|
||||||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp"]
|
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
|
||||||
|
|
||||||
desc "Run puppet in noop mode and check for syntax errors."
|
desc "Run puppet in noop mode and check for syntax errors."
|
||||||
task :validate do
|
task :validate do
|
||||||
Dir['manifests/**/*.pp'].each do |path|
|
Dir['manifests/**/*.pp'].each do |manifest|
|
||||||
sh "puppet parser validate --noop #{path}"
|
sh "puppet parser validate --noop #{manifest}"
|
||||||
|
end
|
||||||
|
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
|
||||||
|
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
|
||||||
|
end
|
||||||
|
Dir['templates/**/*.erb'].each do |template|
|
||||||
|
sh "erb -P -x -T '-' #{template} | ruby -c"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user