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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07edb5cdb3c89d91a2b2e68b9b9aa9b32c5ed3fd1e74eb9ced31f1c29639aa14
4
- data.tar.gz: facb000864a939af4173f283f46ddca7fe80f4f92ef912ece959fa21fab0e073
3
+ metadata.gz: 6a98833df83d2c8a301916b6fd44e4b1f669bdbf71404c4cd859234d31c711ae
4
+ data.tar.gz: f82370c13d24d15b8015b908c6d8c0c9c16ac7cabea608cae77a205dedf308dc
5
5
  SHA512:
6
- metadata.gz: 6f3b97140501ff71b6a5e28eb04b695a1da19c3f7f1715949a51a7260bc4acaca6d13c1f1b3274c8c482c8ea15537d230fc0628dee940c5738361a096427030c
7
- data.tar.gz: 3730fda19ea914da822bdec993d1a0a5c90c133931badd6fd6a0d9678b3d26ecb00c1f38775b1d6368fd46fdc0f87891974196cada4c8d40288aa6d9e0df1918
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
@@ -1,3 +1,3 @@
1
1
  module Stax
2
- VERSION = '0.0.29'
2
+ VERSION = '0.0.30'
3
3
  end
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.29
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: 2019-12-15 00:00:00.000000000 Z
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
- rubyforge_project:
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.