Module: Stax::Codepipeline
- Defined in:
- lib/stax/mixin/codepipeline.rb
Class Method Summary collapse
Instance Method Summary collapse
- #stack_pipeline_names ⇒ Object
-
#stack_pipeline_status(n = 0) ⇒ Object
get status string for n-th pipeline.
- #stack_pipelines ⇒ Object
Class Method Details
.included(thor) ⇒ Object
5 6 7 8 |
# File 'lib/stax/mixin/codepipeline.rb', line 5 def self.included(thor) thor.desc(:codepipeline, 'Codepipeline subcommands') thor.subcommand(:codepipeline, Cmd::Codepipeline) end |
Instance Method Details
#stack_pipeline_names ⇒ Object
14 15 16 |
# File 'lib/stax/mixin/codepipeline.rb', line 14 def stack_pipeline_names @_stack_pipeline_names ||= stack_pipelines.map(&:physical_resource_id) end |
#stack_pipeline_status(n = 0) ⇒ Object
get status string for n-th pipeline
19 20 21 22 |
# File 'lib/stax/mixin/codepipeline.rb', line 19 def stack_pipeline_status(n = 0) name = stack_pipeline_names[n] Aws::Codepipeline.executions(name, 1)&.first&.status end |
#stack_pipelines ⇒ Object
10 11 12 |
# File 'lib/stax/mixin/codepipeline.rb', line 10 def stack_pipelines @_stack_pipelines ||= Aws::Cfn.resources_by_type(stack_name, 'AWS::CodePipeline::Pipeline') end |