Class: Actions::Staypuft::Deployment::Deploy

Inherits:
Base
  • Object
show all
Includes:
Helpers::Lock
Defined in:
app/lib/actions/staypuft/deployment/deploy.rb

Instance Method Summary collapse

Instance Method Details

#humanized_inputObject



32
33
34
# File 'app/lib/actions/staypuft/deployment/deploy.rb', line 32

def humanized_input
  input[:name]
end

#humanized_outputObject



36
37
38
# File 'app/lib/actions/staypuft/deployment/deploy.rb', line 36

def humanized_output
  planned_actions.first.humanized_output
end

#plan(deployment, hosts_to_deploy = nil, hosts_to_provision = nil) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'app/lib/actions/staypuft/deployment/deploy.rb', line 21

def plan(deployment, hosts_to_deploy = nil, hosts_to_provision = nil)
  Type! deployment, ::Staypuft::Deployment

  input.update id: deployment.id, name: deployment.name
  plan_action Hostgroup::OrderedDeploy,
              deployment.child_hostgroups.includes(:role).deploy_order.to_a,
              hosts_to_deploy,
              hosts_to_provision
  lock! deployment
end

#task_outputObject



40
41
42
# File 'app/lib/actions/staypuft/deployment/deploy.rb', line 40

def task_output
  planned_actions.first.task_output
end