41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/stax/mixin/codepipeline.rb', line 41
def history
my.stack_pipeline_names.each do |name|
debug("Execution history for #{name}")
print_table Aws::Codepipeline.executions(name, options[:number]).map { |e|
r = Aws::Codepipeline.execution(name, e.pipeline_execution_id)&.artifact_revisions&.first
age = human_time_diff(Time.now - e.last_update_time, 1)
duration = human_time_diff(e.last_update_time - e.start_time)
[e.pipeline_execution_id, color(e.status, COLORS), "#{age} ago", duration, r&.revision_id&.slice(0,7) + ':' + r&.revision_summary]
}
end
end
|