Class: Jets::CLI::Ci::Status

Inherits:
Base
  • Object
show all
Includes:
Util::FormatTime
Defined in:
lib/jets/cli/ci/status.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods included from Util::FormatTime

#pretty_time, #time_ago_in_words

Methods inherited from Base

#build_id, #check_build_id!, #find_build, #run_with_exception_handling, #show_console_log_url, #stack_name, #stop_build

Methods inherited from Base

#initialize, #paginate, #paging_params, rescue_api_error

Methods included from Util::Logging

#log

Methods included from AwsServices

#apigateway, #aws_options, #cfn, #codebuild, #dynamodb, #lambda_client, #logs, #s3, #s3_resource, #sns, #sqs, #ssm, #sts, #wafv2

Methods included from AwsServices::StackStatus

#output_value, #stack_exists?

Methods included from AwsServices::GlobalMemoist

included, #reset_cache!

Methods included from Api

#api, #api_key

Constructor Details

This class inherits a constructor from Jets::CLI::Base

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/jets/cli/ci/status.rb', line 5

def run
  check_build_id!
  run_with_exception_handling do
    puts "Build id: #{build_id}"
    resp = codebuild.batch_get_builds(ids: [build_id])
    build = resp.builds.first
    puts "Build end time: #{pretty_time(build.end_time)}"
    puts "Build status: #{colored(build.build_status)}"
  end
end