class ContainerShip::Command::ShipCommand

Public Instance Methods

run(cluster_name, service_name, environment, build_number) click to toggle source
# File lib/container_ship/command/ship_command.rb, line 18
def run(cluster_name, service_name, environment, build_number)
  task_definition = TaskDefinition.new(
    cluster_name,
    'services',
    service_name,
    environment,
    build_number
  )

  push_image task_definition

  revision = print_around_task('Registering task definition... ') do
    register task_definition
  end

  print_around_task('Updating service... ') do
    update_service task_definition, revision
  end
end