minimal_pipeline 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dae73303640fdffd715b9d7f67ea9b9f7ecd855dd0ef75d04e1d46eae07571e
4
- data.tar.gz: d0c95d8d34c210e872ab6ae0fe93e8e56d5b3287229e56a04f82a97d690e007b
3
+ metadata.gz: 7ccab14f8669b86b90d7f27b9c6de31dd2cd97ebef5030c770a2bf0a7d8485f3
4
+ data.tar.gz: 52c595ad79d1b3d3261740de4800464523c2eb5a2d3661e658aa3b5bf48d7f6f
5
5
  SHA512:
6
- metadata.gz: 4da91ca383ed709da049eb0b843bfd21066797ed5d0b5ce9126074547c88d03ec7755de2512a4bc51c235069b5b0b7fdb3ac519be99d12ca4fe120e84a58aea9
7
- data.tar.gz: c2a9d49ce298448bf6a41131bd7394ee04c231fa0d5918eaf79af51bb6123c8576f372f1e625826175ae091d045388982eb0efed145b4dcd9f60e01a06f00a68
6
+ metadata.gz: 7777bb80932082218b102db909a9d73f34dc456d403d88d1fec2d959ecfbff690a5cc179f94a8f10013957617e60ad8810b948f6adb2258269467abdd7c992fe
7
+ data.tar.gz: e3c17e9ecfd5dc28ca40b1298f5d8b41ac830f3c8737906de47fbb51435489fcd16961317ab2e6865c5d4341b695f809d950a4793e7eaefdc097b2ccea96a00d
@@ -74,7 +74,7 @@ class MinimalPipeline
74
74
  #
75
75
  # @param stack [String] The name of the CloudFormation stack
76
76
  # @return [Hash] Key value pairs of stack outputs
77
- def stack_outputs(stack)
77
+ def stack_outputs(stack, attempt = 1)
78
78
  response = @client.describe_stacks(stack_name: stack)
79
79
  raise "#{stack.upcase} stack does not exist!" if response.stacks.empty?
80
80
 
@@ -86,6 +86,14 @@ class MinimalPipeline
86
86
  end
87
87
 
88
88
  @outputs[stack]
89
+ rescue Aws::CloudFormation::Errors::Throttling => error
90
+ raise 'Unable to get stack outputs' if attempt > 5
91
+
92
+ delay = attempt * 15
93
+ puts "#{error.message} - Retrying in #{delay}"
94
+ sleep delay
95
+ attempt += 1
96
+ stack_outputs(stack, attempt)
89
97
  end
90
98
 
91
99
  # Creates or Updates a CloudFormation stack. Checks to see if the stack
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimal_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mayowa Aladeojebi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-08 00:00:00.000000000 Z
12
+ date: 2018-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk