-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
55 lines (46 loc) · 1.8 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
# require 'ci/reporter/rake/rspec'
require_relative 'lib/independent_stack'
require_relative 'lib/context_stack'
require_relative 'lib/print_module'
require_relative 'lib/rain_dance'
desc "Describe the template"
task :describe, [:artifacts_path] do |t, args|
stack = IndependentStack.new(args.artifacts_path)
puts PrintModule.print_metadata(stack.metadata)
end
desc "Process multiple stacks listed in manifest file"
task :process_manifest, [:templates_folder_path, :s3_bucket, :s3_region] do |t, args|
templates_folder_path = args.templates_folder_path
s3_bucket, s3_region = args.s3_bucket, args.s3_region
rain_dance = RainDance.new(templates_folder_path, {s3Location: s3_bucket, s3Region: s3_region})
rain_dance.do_jig!
end
desc "Delete multiple stacks listed in manifest file"
task :delete_by_manifest, [:templates_folder_path] do |t, args|
templates_folder_path = args.templates_folder_path
rain_dance = RainDance.new(templates_folder_path)
rain_dance.delete_listed!
end
desc "Process a template for a specific context"
task :process_for_context, [:artifacts_path, :context_name, :s3_bucket, :s3_region] do |t, args|
path = args.artifacts_path
context_name = args.context_name
s3_bucket, s3_region = args.s3_bucket, args.s3_region
stack = ContextStack.new(path, context_name, {s3Location: s3_bucket, s3Region: s3_region})
stack.process!
end
desc "Process a template"
task :process, [:artifacts_path, :s3_bucket, :s3_region] do |t, args|
path = args.artifacts_path || File.dirname(__FILE__)
s3_bucket, s3_region = args.s3_bucket, args.s3_region
stack = IndependentStack.new(path, {s3Location: s3_bucket, s3_region: s3_region})
stack.process!
end
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError
# no rspec available
end
desc "Run spec tests"
task :spec