stax 0.0.21 → 0.0.22

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: 40f1d0e0ef7606928243ab90e197a23a3662bc98412172c5cee932e47ac17a4e
4
- data.tar.gz: 30a497d05e974e81d13f5afd2f612b79ca2de486efe1102aee6552a6cd6e49aa
3
+ metadata.gz: 76cc04f561d9cc7f1a82d2d768a252ba93aeee3f6b512a074524c85dbc810ee2
4
+ data.tar.gz: f9e8b79e837d2ca714d4db200cadf738b07834088eda001d1f352dba8aa19e27
5
5
  SHA512:
6
- metadata.gz: '0935849ccad8faab8bff84fa8a713cb5dc12c6d68ccb505c21eb17bb2f94abc0f8b4473141b8c3e539eb0640602670bbfe3c220c95fd3a9499fda8b6e5fb4151'
7
- data.tar.gz: cdf046837d9c381807f86349efbc786928e5c0bbc320d5a118af2d763b012cff6c883f228a91672b20fb0a3f008ba24932cdb2d67fd69e854d5e8061ad1ebeed
6
+ metadata.gz: '02290aeff597ef846b35649a59a6526277916ffb64e6b4ff15fc0265f8bf84cb49366375776041039d453b59aca441236d47a639c038a7bca12ac7b734430782'
7
+ data.tar.gz: 4601de9bce205f2fb3ccc0a51c89de050f11a6c4107bef175c349cd4748b4fc3c2ad09fc26c02c4df84b0ab5dacb9fb2f65e145b0c48058a3be73719a22821ad
@@ -76,6 +76,15 @@ module Stax
76
76
  end
77
77
  end
78
78
 
79
+ desc 'usage', 'resources associated with certs'
80
+ def usage
81
+ stack_acm_certs.each do |r|
82
+ c = Aws::Acm.describe(r.physical_resource_id)
83
+ debug("Resources associated with #{c.certificate_arn}")
84
+ puts c.in_use_by
85
+ end
86
+ end
87
+
79
88
  end
80
89
  end
81
90
  end
@@ -23,6 +23,8 @@ module Stax
23
23
  COLORS = {
24
24
  Succeeded: :green,
25
25
  Failed: :red,
26
+ enabled: :green,
27
+ disabled: :red,
26
28
  }
27
29
 
28
30
  desc 'stages', 'list pipeline stages'
@@ -122,6 +124,37 @@ module Stax
122
124
  end
123
125
  end
124
126
 
127
+ desc 'transitions', 'control pipeline stage transitions'
128
+ method_option :enable, aliases: '-e', type: :string, default: nil, desc: 'enable stage transition'
129
+ method_option :disable, aliases: '-d', type: :string, default: nil, desc: 'disable stage transition'
130
+ def transitions
131
+ my.stack_pipeline_names.each do |name|
132
+ if options[:enable]
133
+ debug("Enable stage transition for #{name} #{options[:enable]}")
134
+ Aws::Codepipeline.client.enable_stage_transition(
135
+ pipeline_name: name,
136
+ stage_name: options[:enable],
137
+ transition_type: :Inbound,
138
+ )
139
+ elsif options[:disable]
140
+ debug("Disable stage transition for #{name} #{options[:disable]}")
141
+ Aws::Codepipeline.client.disable_stage_transition(
142
+ pipeline_name: name,
143
+ stage_name: options[:disable],
144
+ transition_type: :Inbound,
145
+ reason: ask('reason for disable?')
146
+ )
147
+ else
148
+ debug("Stage transitions for #{name}")
149
+ state = Aws::Codepipeline.state(name)
150
+ print_table state.stage_states.map { |s|
151
+ t = s.inbound_transition_state
152
+ [ s.stage_name, color(t.enabled ? :enabled : :disabled, COLORS), t.disabled_reason, t.last_changed_at ]
153
+ }
154
+ end
155
+ end
156
+ end
157
+
125
158
  end
126
159
  end
127
160
  end
data/lib/stax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stax
2
- VERSION = '0.0.21'
2
+ VERSION = '0.0.22'
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.21
4
+ version: 0.0.22
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-07-01 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler