Class: Kamal::Cli::App::RolloutBoot

Inherits:
Object
  • Object
show all
Defined in:
lib/kamal/cli/app/rollout_boot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, role, sshkit, version) ⇒ RolloutBoot

Returns a new instance of RolloutBoot.



5
6
7
8
9
10
# File 'lib/kamal/cli/app/rollout_boot.rb', line 5

def initialize(host, role, sshkit, version)
  @host = host
  @role = role
  @version = version
  @sshkit = sshkit
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



2
3
4
# File 'lib/kamal/cli/app/rollout_boot.rb', line 2

def host
  @host
end

#roleObject (readonly)

Returns the value of attribute role.



2
3
4
# File 'lib/kamal/cli/app/rollout_boot.rb', line 2

def role
  @role
end

#sshkitObject (readonly)

Returns the value of attribute sshkit.



2
3
4
# File 'lib/kamal/cli/app/rollout_boot.rb', line 2

def sshkit
  @sshkit
end

#versionObject (readonly)

Returns the value of attribute version.



2
3
4
# File 'lib/kamal/cli/app/rollout_boot.rb', line 2

def version
  @version
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/kamal/cli/app/rollout_boot.rb', line 12

def run
  ensure_not_already_deployed

  begin
    start_rollout_target
  rescue
    stop_rollout_target
    raise
  end
rescue Kamal::Cli::BootError => e
  error e.message
  raise
end