Class: Ey::Core::Cli::TimeoutDeploy

Inherits:
Subcommand
  • Object
show all
Defined in:
lib/ey-core/cli/timeout_deploy.rb

Instance Method Summary collapse

Methods inherited from Subcommand

#handle_core_error, #run_handle, #setup

Methods included from Helpers::Core

#core_account, #core_accounts, #core_application_for, #core_applications, #core_client, #core_environment_for, #core_environment_variables, #core_environments, #core_operator_and_environment_for, #core_server_for, #core_url, #core_yaml, #eyrc_yaml, included, #longest_length_by_name, #operator, #unauthenticated_core_client, #write_core_yaml

Instance Method Details

#handleObject



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/ey-core/cli/timeout_deploy.rb', line 43

def handle
  operator, environment = core_operator_and_environment_for(self.options)
  app                   = core_application_for(environment, options)
  deployment = core_client.
    deployments.
    first(environment_id: environment.id, application_id: app.id)

  puts "Timing out the most recent deployment (deploy started at: #{deployment.started_at})".green

  deployment.timeout(option(:message))
  ap deployment
end