Class: Cody::Logs

Inherits:
Base
  • Object
show all
Defined in:
lib/cody/logs.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #run_with_exception_handling

Methods included from AwsServices

#cfn, #codebuild

Methods included from AwsServices::Helpers

#are_you_sure?, #inferred_project_name, #inferred_stack_name, #project_name_convention, #stack_exists?

Constructor Details

This class inherits a constructor from Cody::Base

Instance Method Details

#build_idObject



9
10
11
12
13
14
# File 'lib/cody/logs.rb', line 9

def build_id
  return @options[:build_id] if @options[:build_id]

  resp = codebuild.list_builds_for_project(project_name: @full_project_name)
  resp.ids.first # most recent build_id
end

#runObject



3
4
5
6
7
# File 'lib/cody/logs.rb', line 3

def run
  run_with_exception_handling do
    Tailer.new(@options, build_id).run
  end
end