Class: Jets::CLI::Ci::Tailer

Inherits:
Remote::Tailer show all
Defined in:
lib/jets/cli/ci/tailer.rb

Instance Method Summary collapse

Methods inherited from Remote::Tailer

#build_phase_started?, #build_time, #cloudwatch_tail, #complete_failed?, #display_failed_phases, #display_phase, #display_time_took, #filter_phase_type?, #find_build, #initialize, #logs_command?, #output, #phase_duration, #phase_status, #print_phases, #run, #say, #set_log_group_name, #start_cloudwatch_tail, #stop_cloudwatch_tail

Methods included from Util::Pretty

#pretty_home, #pretty_path, #pretty_time

Methods inherited from Remote::Base

#initialize

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!

Constructor Details

This class inherits a constructor from Jets::Remote::Tailer

Instance Method Details

#show_ifObject



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

def show_if
  return true unless Jets.bootstrap.config.codebuild.logging.show == "filtered"

  start_marker = "Entering phase BUILD"
  end_marker = "Phase complete: BUILD"
  proc do |event|
    @display_showing ||= event.message.include?(start_marker)
    if @display_showing && event.message.include?(end_marker)
      @display_showing = false
    end
    @display_showing && !event.message.include?(start_marker)
  end
end