forked from Azure/terraform-azurerm-aks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
64 lines (52 loc) · 1.27 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Official gems.
require 'colorize'
require 'rspec/core/rake_task'
# Git repo gems.
require 'bundler/setup'
require 'terramodtest'
namespace :presteps do
task :ensure do
puts "Using dep ensure to install required go packages.\n"
success = system ("dep ensure")
if not success
raise "ERROR: Dep ensure failed!\n".red
end
end
end
namespace :static do
task :style do
style_tf
end
task :lint do
success = system ("terraform init")
if not success
raise "ERROR: terraform init failed!\n".red
end
lint_tf
end
task :format do
format_tf
end
task :readme_style do
readme_style_tf
end
task :fixture_style do
fixture_style_tf
end
end
namespace :integration do
task :test do
success = system ("go test -v ./test/ -timeout 45m")
if not success
raise "ERROR: Go test failed!\n".red
end
end
end
task :prereqs => [ 'presteps:ensure' ]
task :validate => [ 'static:style', 'static:lint', 'static:readme_style','static:fixture_style']
task :format => [ 'static:format' ]
task :build => [ 'prereqs', 'validate' ]
task :unit => []
task :e2e => [ 'integration:test' ]
task :default => [ 'build' ]
task :full => [ 'build', 'unit', 'e2e' ]