Sha256: 2cf38a627dcf29ea455ef3562a4b3bfdb2e969588c3b3b826fec2ca63ae7af56
Contents?: true
Size: 642 Bytes
Versions: 8
Compression:
Stored size: 642 Bytes
Contents
module Cody class Status < Base def run run_with_exception_handling do puts "Build id: #{build_id}" resp = codebuild.batch_get_builds(ids: [build_id]) build = resp.builds.first puts "Build status: #{colored(build.build_status)}" end end private def colored(status) # one of SUCCEEDED FAILED FAULT TIMED_OUT IN_PROGRESS STOPPED case status when "SUCCEEDED" status.color(:green) when "FAILED", "FAULT", "TIMED_OUT" status.color(:red) when "IN_PROGRESS" status.color(:yellow) else status end end end end
Version data entries
8 entries across 8 versions & 1 rubygems