Method: Stax::Cmd::Codebuild#reports

Defined in:
lib/stax/mixin/codebuild.rb

#reports(id = nil) ⇒ Object



67
68
69
70
71
72
73
74
75
# File 'lib/stax/mixin/codebuild.rb', line 67

def reports(id = nil)
  id ||= Aws::Codebuild.builds_for_project(my.stack_project_names.first, 1).first
  debug("Reports for build #{id}")
  report_arns = Aws::Codebuild.builds([id]).first.report_arns
  print_table Aws::Codebuild.reports(report_arns).map { |r|
    duration = (r.test_summary.duration_in_nano_seconds/1_000_000_000.0).to_s + 's'
    [ r.name, color(r.status, COLORS), duration, r.created ]
  }
end