133
134
135
136
137
138
139
140
141
142
143
144
145
|
# File 'lib/stax/mixin/codepipeline.rb', line 133
def stop(name = nil)
name ||= my.stack_pipeline_names.first
id = Aws::Codepipeline.state(name).stage_states.first.latest_execution.pipeline_execution_id
debug("Stopping #{name} #{id}")
puts Aws::Codepipeline.client.stop_pipeline_execution(
pipeline_name: name,
pipeline_execution_id: id,
abandon: options[:abandon],
reason: options[:reason],
).pipeline_execution_id
rescue ::Aws::CodePipeline::Errors::ServiceError => e
fail_task(e.message)
end
|