Class: Renuo::Cli::Commands::CheckDeploioStatus
- Inherits:
-
Object
- Object
- Renuo::Cli::Commands::CheckDeploioStatus
- Defined in:
- lib/renuo/cli/commands/check_deploio_status.rb
Overview
:nocov:
Constant Summary collapse
- TIMEOUT_IN_SECONDS =
600- INTERVAL_IN_SECONDS =
30- APP_NAME =
ENV.fetch "DEPLOIO_APP_NAME", nil
- PROJECT =
ENV.fetch "DEPLOIO_PROJECT", nil
Instance Method Summary collapse
-
#initialize(options) ⇒ CheckDeploioStatus
constructor
A new instance of CheckDeploioStatus.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ CheckDeploioStatus
19 20 21 22 23 |
# File 'lib/renuo/cli/commands/check_deploio_status.rb', line 19 def initialize() abort "missing env DEPLOIO_APP_NAME" if APP_NAME.nil? abort "missing env DEPLOIO_PROJECT" if PROJECT.nil? @revision = .git_revision || `git rev-parse HEAD`.strip end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/renuo/cli/commands/check_deploio_status.rb', line 25 def run puts "(1/2) Checking build status for revision #{@revision}..." 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}..." poll "release" abort "release check timed out after #{TIMEOUT_IN_SECONDS} seconds" if release.nil? end |