stax 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stax/mixin/codepipeline.rb +20 -1
- data/lib/stax/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a98833df83d2c8a301916b6fd44e4b1f669bdbf71404c4cd859234d31c711ae
|
4
|
+
data.tar.gz: f82370c13d24d15b8015b908c6d8c0c9c16ac7cabea608cae77a205dedf308dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b71d288f1c715cfa4a289b110e71ca4a7cac42f2cf765f85fcd2346ea647e91473cd449cfffc548e9b9bbe457095dc50375b3567713ca1f63b97e22df01a4c6
|
7
|
+
data.tar.gz: 236f0add322be2bf4b444f8653a1ad838deed3adda5067209f9ae24daa28d410b638de4d71f510d51c0dd855d410cbdc0d233343bfc599a1f94e0f7aabb74efa
|
@@ -23,6 +23,8 @@ module Stax
|
|
23
23
|
COLORS = {
|
24
24
|
Succeeded: :green,
|
25
25
|
Failed: :red,
|
26
|
+
Stopped: :red,
|
27
|
+
Abandoned: :red,
|
26
28
|
enabled: :green,
|
27
29
|
disabled: :red,
|
28
30
|
}
|
@@ -105,6 +107,23 @@ module Stax
|
|
105
107
|
tail name
|
106
108
|
end
|
107
109
|
|
110
|
+
desc 'stop [NAME]', 'stop execution for pipeline'
|
111
|
+
method_option :abandon, aliases: '-a', type: :boolean, default: false, desc: 'do not finish in-progress actions'
|
112
|
+
method_option :reason, aliases: '-r', type: :string, default: nil, desc: 'comment on reason for stop'
|
113
|
+
def stop(name = nil)
|
114
|
+
name ||= my.stack_pipeline_names.first
|
115
|
+
id = Aws::Codepipeline.state(name).stage_states.first.latest_execution.pipeline_execution_id
|
116
|
+
debug("Stopping #{name} #{id}")
|
117
|
+
puts Aws::Codepipeline.client.stop_pipeline_execution(
|
118
|
+
pipeline_name: name,
|
119
|
+
pipeline_execution_id: id,
|
120
|
+
abandon: options[:abandon],
|
121
|
+
reason: options[:reason],
|
122
|
+
).pipeline_execution_id
|
123
|
+
rescue ::Aws::CodePipeline::Errors::ServiceError => e
|
124
|
+
fail_task(e.message)
|
125
|
+
end
|
126
|
+
|
108
127
|
desc 'tail [NAME]', 'tail pipeline state changes'
|
109
128
|
def tail(name = nil)
|
110
129
|
trap('SIGINT', 'EXIT') # clean exit with ctrl-c
|
@@ -170,4 +189,4 @@ module Stax
|
|
170
189
|
|
171
190
|
end
|
172
191
|
end
|
173
|
-
end
|
192
|
+
end
|
data/lib/stax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Lister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -274,8 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
- !ruby/object:Gem::Version
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
|
-
|
278
|
-
rubygems_version: 2.7.6.2
|
277
|
+
rubygems_version: 3.1.2
|
279
278
|
signing_key:
|
280
279
|
specification_version: 4
|
281
280
|
summary: Control Cloudformation stack and other stuff.
|