Exception: DreamOps::OpsWorksCommandFailedError

Inherits:
DreamOpsError
  • Object
show all
Defined in:
lib/dream-ops/errors.rb

Instance Method Summary collapse

Methods inherited from DreamOpsError

set_status_code

Constructor Details

#initialize(stack, deployment_id, command) ⇒ OpsWorksCommandFailedError

Returns a new instance of OpsWorksCommandFailedError.



29
30
31
32
33
# File 'lib/dream-ops/errors.rb', line 29

def initialize(stack, deployment_id, command)
  @stack         = stack
  @deployment_id = deployment_id
  @command       = command
end

Instance Method Details

#to_sObject



35
36
37
38
39
40
41
# File 'lib/dream-ops/errors.rb', line 35

def to_s
  [
    "Stack \"#{@stack.name}\" failed running command '#{@command}'. To view the failure log, visit:",
    "",
    "https://console.aws.amazon.com/opsworks/home?region=#{@stack.region}#/stack/#{@stack.stack_id}/deployments/#{@deployment_id}",
  ].join("\n")
end