aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-12-30 13:39:04 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-12-30 13:39:04 -0200
commit8a074424708a2ca7c7625e138fe29621ae3315a8 (patch)
tree0a1a47e55d7d49114cf246b9efea1e0907ee1cbd /Rakefile
parenta1bde593bf95ea1048a35ad6c42cbad8c7a51971 (diff)
parent6fcf75d46a5c7fcd00fd4470270552b543cf4452 (diff)
downloadpuppet-common-master.tar.gz
puppet-common-master.tar.bz2
Merge branch 'master' of https://gitlab.com/shared-puppet-modules-group/commonHEADmaster
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..85326bb
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,19 @@
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+PuppetLint.configuration.send('disable_80chars')
+PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
+
+desc "Validate manifests, templates, and ruby files"
+task :validate do
+ Dir['manifests/**/*.pp'].each do |manifest|
+ 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
+
+task :test => [:lint, :syntax , :validate, :spec]