-
Notifications
You must be signed in to change notification settings - Fork 19
/
Rakefile
31 lines (25 loc) · 931 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'bundler/setup'
require 'rspec/core/rake_task'
task :default => [:spec, :smoke_test]
RSpec::Core::RakeTask.new(:spec)
desc "Run test manifests"
task :smoke_test do
Dir.glob('tests/**/*.pp').each do |test_manifest|
puts "Applying test manifest #{test_manifest}"
success = system(File.join(ENV['ProgramFiles(x86)'], 'Puppet Labs/Puppet/bin/puppet.bat'), 'apply', '--verbose', '--noop', '--detailed-exitcodes', test_manifest)
raise 'Test manifest failed' unless success
end
end
desc "Build package"
task :build do
Dir.glob('modules/*').each do |module_dir|
puts "Building '#{module_dir}'"
success = system('bundle', 'exec', 'puppet', 'module', 'build', module_dir)
raise 'Build failed' unless success
end
end
desc "Run acceptance tests"
task :acceptance_test do
success = system('bundle', 'exec', 'cucumber', '--strict')
raise 'Build failed' unless success
end