sfn 3.0.2 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/docs/callbacks.md +5 -5
- data/lib/sfn/command/events.rb +14 -1
- data/lib/sfn/command_module/template.rb +7 -7
- data/lib/sfn/planner/aws.rb +1 -1
- data/lib/sfn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5dbbdec8d298bd67a3aefc4165d871d263619df
|
4
|
+
data.tar.gz: 5170f01c227cf78fd58342c21487fa4d6793fecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00763fc81a15a13447d6b1f72088b2231801d44512445c2e4046f4b0df1ccfd48018183a3f6e6581c237cb093cf8b9a8f0ba3292788add746de39fd9c07b0a55
|
7
|
+
data.tar.gz: 05238e596ac34dec5ccada596e7cfae2251af646600a44c3e0a20af94892664771251376035f0bba56b09826022b27b8f7acd313c2c0bcc7e5543c5e36dc828d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# v3.0.4
|
2
|
+
* [fix] Update parameter values extraction location in planner
|
3
|
+
* [fix] Merge compile time parameters when existing are available
|
4
|
+
* [enhancement] Reduce response size on event polling where available
|
5
|
+
|
1
6
|
# v3.0.2
|
2
7
|
* [fix] Properly scrub nested stack pseudo property on update (#189)
|
3
8
|
* [fix] Process nested stacks before removal within AWS planner (#190)
|
data/README.md
CHANGED
@@ -22,6 +22,7 @@ with orchestration APIs.
|
|
22
22
|
|
23
23
|
* Repository: https://github.com/sparkleformation/sfn
|
24
24
|
* Website: http://www.sparkleformation.io/docs/sfn/
|
25
|
+
* Mailing List: https://groups.google.com/forum/#!forum/sparkleformation
|
25
26
|
* IRC: Freenode @ #sparkleformation
|
26
27
|
|
27
28
|
[miasma]: http://miasma-rb.github.io/miasma/
|
data/docs/callbacks.md
CHANGED
@@ -83,7 +83,7 @@ instead of during configuration. This can be done by using a special
|
|
83
83
|
`:sfn` group within your bundle. For example, to load the `sfn-serverspec`
|
84
84
|
callback immediately the Gemfile should look like:
|
85
85
|
|
86
|
-
|
86
|
+
~~~ruby
|
87
87
|
# Gemfile
|
88
88
|
source 'https://rubygems.org'
|
89
89
|
|
@@ -92,7 +92,7 @@ gem 'sfn'
|
|
92
92
|
group :sfn do
|
93
93
|
gem 'sfn-serverspec'
|
94
94
|
end
|
95
|
-
|
95
|
+
~~~
|
96
96
|
|
97
97
|
### Builtin Callbacks
|
98
98
|
|
@@ -314,7 +314,7 @@ The sfn command will output a notification to the user before a callback is
|
|
314
314
|
run, and after it has completed. This may be too verbose for some callbacks.
|
315
315
|
A callback may disable this output using the `quiet` method:
|
316
316
|
|
317
|
-
|
317
|
+
~~~ruby
|
318
318
|
module Sfn
|
319
319
|
class Callback
|
320
320
|
class MyCallback < Callback
|
@@ -326,7 +326,7 @@ module Sfn
|
|
326
326
|
end
|
327
327
|
end
|
328
328
|
end
|
329
|
-
|
329
|
+
~~~
|
330
330
|
|
331
331
|
### Addon Callbacks
|
332
332
|
|
@@ -360,4 +360,4 @@ Manage stack parameters via files within the project repository.
|
|
360
360
|
Define Serverspec rules directly on resources within templates
|
361
361
|
and automatically run after success stack creation or update.
|
362
362
|
|
363
|
-
* https://github.com/sparkleformation/sfn-serverspec
|
363
|
+
* https://github.com/sparkleformation/sfn-serverspec
|
data/lib/sfn/command/events.rb
CHANGED
@@ -63,7 +63,20 @@ module Sfn
|
|
63
63
|
# @return [Array<Hash>]
|
64
64
|
def get_events(*args)
|
65
65
|
stack_events = discover_stacks(stack).map do |i_stack|
|
66
|
-
|
66
|
+
begin
|
67
|
+
if(@initial_complete && i_stack.in_progress?)
|
68
|
+
i_events = i_stack.events.update!
|
69
|
+
else
|
70
|
+
i_events = i_stack.events.all
|
71
|
+
end
|
72
|
+
rescue => e
|
73
|
+
if(e.class.to_s.start_with?('Errno'))
|
74
|
+
ui.warn "Connection error encountered: #{e.message} (retrying)"
|
75
|
+
ui.debug "#{e.class}: #{e}\n#{e.backtrace.join("\n")}"
|
76
|
+
sleep(5)
|
77
|
+
retry
|
78
|
+
end
|
79
|
+
end
|
67
80
|
i_events.map do |e|
|
68
81
|
e.attributes.merge(:stack_name => i_stack.name).to_smash
|
69
82
|
end
|
@@ -162,6 +162,13 @@ module Sfn
|
|
162
162
|
elsif(config[:file])
|
163
163
|
if(config[:processing])
|
164
164
|
compile_state = config.fetch(:compile_parameters, Smash.new)
|
165
|
+
compile_state.keys.each do |cs_key|
|
166
|
+
if(cs_key.to_s.start_with?(arguments.first.to_s))
|
167
|
+
cli_provided = compile_state.delete(cs_key.to_s.sub("#{arguments.first.to_s}__", ''))
|
168
|
+
compile_state[cs_key].deep_merge!(cli_provided)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
ui.debug "Merged compile parameters - #{compile_state}"
|
165
172
|
sf = SparkleFormation.compile(config[:file], :sparkle)
|
166
173
|
if(name_args.first)
|
167
174
|
sf.name = name_args.first
|
@@ -170,13 +177,6 @@ module Sfn
|
|
170
177
|
f_name = formation.root_path.map(&:name).map(&:to_s)
|
171
178
|
pathed_name = f_name.join(' > ')
|
172
179
|
f_name = f_name.join('__')
|
173
|
-
current_state = compile_state[f_name]
|
174
|
-
unless(current_state)
|
175
|
-
f_name = f_name.split('__')
|
176
|
-
f_name.shift
|
177
|
-
f_name = f_name.join('__')
|
178
|
-
current_state = f_name.empty? ? compile_state : compile_state[f_name]
|
179
|
-
end
|
180
180
|
if(formation.root? && compile_state[f_name].nil?)
|
181
181
|
current_state = compile_state
|
182
182
|
else
|
data/lib/sfn/planner/aws.rb
CHANGED
@@ -316,7 +316,7 @@ module Sfn
|
|
316
316
|
end
|
317
317
|
new_stack_exists = is_stack?(new_template_hash.get('Resources', stack_name, 'Type'))
|
318
318
|
new_stack_template = new_template_hash.fetch('Resources', stack_name, 'Properties', 'Stack', Smash.new)
|
319
|
-
new_stack_parameters =
|
319
|
+
new_stack_parameters = new_template_hash.fetch('Resources', stack_name, 'Properties', 'Parameters', Smash.new)
|
320
320
|
new_stack_type = new_template_hash.fetch('Resources', stack_name, 'Type',
|
321
321
|
origin_template.get('Resources', stack_name, 'Type')
|
322
322
|
)
|
data/lib/sfn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bogo-cli
|