cfncli 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/cfncli/cli.rb +22 -2
- data/lib/cfncli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDI4ZmQ1ZGEwNjM2Y2UzOWFkOWY3YTUwMmZiYzY2MjY2MjU5MTIyOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjdiNjhmOTA5N2Y4NGY1MzZhOTdjODVmNWM4MWEwZTUwYzJmYmNjMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWUyZjUzNDFmNjRiMDE5NzIwMjA0MWIwMWJkY2ZhZmIxMzkzYTdkNDNmYWU4
|
10
|
+
YjQ1ODI4MTljYjA4ZGJiNTgzY2RlMGFkZThiNzcxZDlhNDg3MTJjYzliYjAx
|
11
|
+
NzUzMzM4NDczOWNjM2RkOTkzM2FlM2NhOGQ1NWI1MjI4MjBiNmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjBjM2I4OGMzMzMyMWJkYmZmMzA0ZDY5Y2MwNWY2YzRjYzNkYzQzYzcyMWUx
|
14
|
+
YmY3NTA3MDdkZGFkYmUxMWU4NmI0MjRlMzdhY2I1ZmIxZDZmYjI5YTkxMzI1
|
15
|
+
NTI2MDFkYjY1NGJmMDdkNDE4MWMxZjkwNzk5ZWNjMjU4ZTk3NDk=
|
data/lib/cfncli/cli.rb
CHANGED
@@ -29,6 +29,12 @@ module CfnCli
|
|
29
29
|
default: 'cfncli.yml',
|
30
30
|
desc: 'Configuration file'
|
31
31
|
|
32
|
+
class_option 'sync_stdout',
|
33
|
+
type: :boolean,
|
34
|
+
default: true,
|
35
|
+
desc: 'Force stdout to be flushed everytime. Useful to update logs in real time when running in CI'
|
36
|
+
|
37
|
+
|
32
38
|
# Stack options
|
33
39
|
method_option 'stack_name',
|
34
40
|
alias: '-n',
|
@@ -170,13 +176,18 @@ module CfnCli
|
|
170
176
|
default: 1800,
|
171
177
|
desc: 'Timeout (in seconds) for the stack event listing'
|
172
178
|
|
179
|
+
method_option 'retry_limit',
|
180
|
+
type: :numeric,
|
181
|
+
default: 5,
|
182
|
+
desc: 'Maximum number of retries for the AWS backoff mechanism'
|
183
|
+
|
173
184
|
desc 'events', 'Displays the events for a stack in realtime'
|
174
185
|
def events
|
175
186
|
stack_name = options['stack_name']
|
176
187
|
|
177
188
|
fail ArgumentError, 'stack_name is required' unless stack_name
|
178
189
|
|
179
|
-
config = Config::CfnClient.new(options['interval'], options['retries'])
|
190
|
+
config = Config::CfnClient.new(options['interval'], options['retries'], options['retry_limit'])
|
180
191
|
cfn.events(stack_name, config)
|
181
192
|
end
|
182
193
|
|
@@ -196,6 +207,11 @@ module CfnCli
|
|
196
207
|
default: 1800,
|
197
208
|
desc: 'Timeout (in seconds) for the stack event listing'
|
198
209
|
|
210
|
+
method_option 'retry_limit',
|
211
|
+
type: :numeric,
|
212
|
+
default: 5,
|
213
|
+
desc: 'Maximum number of retries for the AWS backoff mechanism'
|
214
|
+
|
199
215
|
desc 'delete', 'Deletes a stack'
|
200
216
|
def delete
|
201
217
|
opts = options.dup
|
@@ -205,11 +221,12 @@ module CfnCli
|
|
205
221
|
|
206
222
|
interval = consume_option(opts, 'interval')
|
207
223
|
timeout = consume_option(opts, 'timeout')
|
224
|
+
retry_limit = consume_option(opts, 'timeout')
|
208
225
|
consume_option(opts, 'log_level')
|
209
226
|
consume_option(opts, 'config_file')
|
210
227
|
retries = timeout / interval
|
211
228
|
|
212
|
-
config = Config::CfnClient.new(interval, retries)
|
229
|
+
config = Config::CfnClient.new(interval, retries, retry_limit)
|
213
230
|
cfn.delete_stack(opts, config)
|
214
231
|
end
|
215
232
|
|
@@ -246,6 +263,9 @@ module CfnCli
|
|
246
263
|
check_exclusivity(opts.keys, ['stack_policy_body', 'stack_policy_url'])
|
247
264
|
check_exclusivity(opts.keys, ['parameters', 'parameters_file'])
|
248
265
|
|
266
|
+
sync_stdout = consume_option(opts, 'sync_stdout')
|
267
|
+
$stdout.sync = sync_stdout
|
268
|
+
|
249
269
|
opts['template_body'] = file_or_content(opts['template_body']) if opts['template_body']
|
250
270
|
opts['stack_policy_body'] = file_or_content(opts['stack_policy_body']) if opts['stack_policy_body']
|
251
271
|
opts['parameters'] = process_stack_parameters(opts['parameters']) if opts['parameters']
|
data/lib/cfncli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfncli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lethalpaga
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|