Method: Stax::Ecs#ecs_deploy

Defined in:
lib/stax/mixin/ecs/deploy.rb

#ecs_deploy(id) {|hash| ... } ⇒ Object

update taskdef for a service, triggering a deploy modify current taskdef in block

Yields:

  • (hash)


36
37
38
39
40
41
42
43
44
45
46
# File 'lib/stax/mixin/ecs/deploy.rb', line 36

def ecs_deploy(id, &block)
  service = Aws::Ecs.services(ecs_cluster_name, [resource(id)]).first
  taskdef = get_taskdef(service)

  ## convert to a hash and modify in block
  hash = taskdef_to_hash(taskdef)
  yield(hash) if block_given?

  taskdef = register_taskdef(hash)
  update_service(service, taskdef)
end