stack_master 1.11.1-x64-mingw32 → 1.12.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/stack_master.rb +19 -2
- data/lib/stack_master/cli.rb +6 -1
- data/lib/stack_master/commands/apply.rb +1 -1
- data/lib/stack_master/commands/delete.rb +1 -1
- data/lib/stack_master/parameter_resolvers/latest_container.rb +4 -2
- data/lib/stack_master/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e52ba7c1a39b2978a64717487b4cf314e04d64c8
|
4
|
+
data.tar.gz: f143cfd33624bac80dab51329bd0ae89eb574379
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 204f9935c56cbef2bd7814b8a7ee80ed8fdd479239f423224b320124331fb300d56fd11772e4183300ad07259e47c650a5ca3c59dd666c955a01b38ea07594da
|
7
|
+
data.tar.gz: 128e2a78fba1d8823234dbad20c95adbfb53cf5341ecfad9fbe28edb14d5ffee4bf7ee25255b03a1486d6d6db9f4d889346fa97041f7daf3bb0e819e9e36e3e9
|
data/README.md
CHANGED
@@ -344,7 +344,7 @@ Returns the docker repository URI, i.e. `aws_account_id.dkr.ecr.region.amazonaws
|
|
344
344
|
container_image_id:
|
345
345
|
latest_container:
|
346
346
|
repository_name: nginx # Required. The name of the repository
|
347
|
-
registry_id: 012345678910 # The AWS Account ID the repository is located in. Defaults to the current account's default registry
|
347
|
+
registry_id: "012345678910" # The AWS Account ID the repository is located in. Defaults to the current account's default registry. Must be in quotes.
|
348
348
|
region: us-east-1 # Defaults to the region the stack is located in
|
349
349
|
tag: production # By default we'll find the latest image pushed to the repository. If tag is specified we return the sha digest of the image with this tag
|
350
350
|
```
|
data/lib/stack_master.rb
CHANGED
@@ -94,6 +94,10 @@ module StackMaster
|
|
94
94
|
autoload :Streamer, 'stack_master/stack_events/streamer'
|
95
95
|
end
|
96
96
|
|
97
|
+
NON_INTERACTIVE_DEFAULT = false
|
98
|
+
DEBUG_DEFAULT = false
|
99
|
+
QUIET_DEFAULT = false
|
100
|
+
|
97
101
|
def interactive?
|
98
102
|
!non_interactive?
|
99
103
|
end
|
@@ -101,7 +105,7 @@ module StackMaster
|
|
101
105
|
def non_interactive?
|
102
106
|
@non_interactive
|
103
107
|
end
|
104
|
-
@non_interactive =
|
108
|
+
@non_interactive = NON_INTERACTIVE_DEFAULT
|
105
109
|
|
106
110
|
def non_interactive!
|
107
111
|
@non_interactive = true
|
@@ -110,7 +114,7 @@ module StackMaster
|
|
110
114
|
def debug!
|
111
115
|
@debug = true
|
112
116
|
end
|
113
|
-
@debug =
|
117
|
+
@debug = DEBUG_DEFAULT
|
114
118
|
|
115
119
|
def debug?
|
116
120
|
@debug
|
@@ -121,6 +125,19 @@ module StackMaster
|
|
121
125
|
stderr.puts "[DEBUG] #{message}".colorize(:green)
|
122
126
|
end
|
123
127
|
|
128
|
+
def quiet!
|
129
|
+
@quiet = true
|
130
|
+
end
|
131
|
+
@quiet = QUIET_DEFAULT
|
132
|
+
|
133
|
+
def quiet?
|
134
|
+
@quiet
|
135
|
+
end
|
136
|
+
|
137
|
+
def reset_flags
|
138
|
+
@quiet = QUIET_DEFAULT
|
139
|
+
end
|
140
|
+
|
124
141
|
attr_accessor :non_interactive_answer
|
125
142
|
@non_interactive_answer = 'y'
|
126
143
|
|
data/lib/stack_master/cli.rb
CHANGED
@@ -35,6 +35,9 @@ module StackMaster
|
|
35
35
|
global_option '-d', '--debug', 'Run in debug mode' do
|
36
36
|
StackMaster.debug!
|
37
37
|
end
|
38
|
+
global_option '-q', '--quiet', 'Do not output the resulting Stack Events, just return immediately' do
|
39
|
+
StackMaster.quiet!
|
40
|
+
end
|
38
41
|
|
39
42
|
command :apply do |c|
|
40
43
|
c.syntax = 'stack_master apply [region_or_alias] [stack_name]'
|
@@ -187,8 +190,10 @@ module StackMaster
|
|
187
190
|
region = args[0]
|
188
191
|
end
|
189
192
|
|
193
|
+
stack_name = Utils.underscore_to_hyphen(args[1])
|
194
|
+
|
190
195
|
StackMaster.cloud_formation_driver.set_region(region)
|
191
|
-
StackMaster::Commands::Delete.perform(region,
|
196
|
+
StackMaster::Commands::Delete.perform(region, stack_name)
|
192
197
|
end
|
193
198
|
end
|
194
199
|
|
@@ -17,12 +17,14 @@ module StackMaster
|
|
17
17
|
ecr_client = Aws::ECR::Client.new(region: @region)
|
18
18
|
|
19
19
|
images = fetch_images(parameters['repository_name'], parameters['registry_id'], ecr_client)
|
20
|
-
return nil if images.empty?
|
21
20
|
|
22
|
-
|
21
|
+
unless parameters['tag'].nil?
|
23
22
|
images.select! { |image| image.image_tags.any? { |tag| tag == parameters['tag'] } }
|
24
23
|
end
|
25
24
|
images.sort! { |image_x, image_y| image_y.image_pushed_at <=> image_x.image_pushed_at }
|
25
|
+
|
26
|
+
return nil if images.empty?
|
27
|
+
|
26
28
|
latest_image = images.first
|
27
29
|
|
28
30
|
# aws_account_id.dkr.ecr.region.amazonaws.com/repository@sha256:digest
|
data/lib/stack_master/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_master
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Steve Hodgkiss
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '0'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|