forked from silpion/ansible-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (28 loc) · 708 Bytes
/
Rakefile
File metadata and controls
36 lines (28 loc) · 708 Bytes
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
32
33
34
35
36
require 'rake'
require 'rspec/core/rake_task'
# the Docker and Vagrant specific rake tasks live in the rake/
# directory.
# Add the rake/ directory to the ruby $LOAD_PATH.
$:.unshift File.dirname(__FILE__) + '/rake'
if ENV['RAKE_ANSIBLE_USE_VAGRANT']
require 'vagrant'
else
require 'docker'
end
desc "Run integration tests with serverspec"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/*/*_spec.rb'
end
desc "Test ansible playbook syntax"
task :lint do
sh %{ansible-playbook --inventory-file tests/hosts --syntax-check tests/playbook.yml}
end
task :default => :lint
desc "Run test suite with Docker or Vagrant"
task :suite => [
:lint,
:up,
:provision,
:spec,
:clean
]