Class: Renuo::Cli::Commands::Ci::CheckDeploioStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/renuo/cli/commands/ci/check_deploio_status.rb

Overview

rubocop:disable Metrics/ClassLength

Constant Summary collapse

TIMEOUT_IN_SECONDS =
600
INTERVAL_IN_SECONDS =
5
LOG_DRAIN_SECONDS =
2

Instance Method Summary collapse

Instance Method Details

#runObject



19
20
21
22
23
24
25
26
27
# File 'lib/renuo/cli/commands/ci/check_deploio_status.rb', line 19

def run
  puts "(1/2) Checking build status for revision #{@revision}..."
  with_streamed_logs("build") { poll "build" }
  abort "build check timed out after #{TIMEOUT_IN_SECONDS} seconds" if build.nil?

  puts "(2/2) Checking release status for build #{build_name}..."
  with_streamed_logs("app") { poll "release" }
  abort "release check timed out after #{TIMEOUT_IN_SECONDS} seconds" if release.nil?
end