Method: Beaker::AwsSdk#add_tags

Defined in:
lib/beaker/hypervisor/aws_sdk.rb

#add_tagsvoid

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Add metadata tags to all instances



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/beaker/hypervisor/aws_sdk.rb', line 367

def add_tags
  @hosts.each do |host|
    instance = host['instance']

    # Define tags for the instance
    @logger.notify("aws-sdk: Add tags for #{host.name}")
    instance.add_tag("jenkins_build_url", :value => @options[:jenkins_build_url])
    instance.add_tag("Name", :value => host.name)
    instance.add_tag("department", :value => @options[:department])
    instance.add_tag("project", :value => @options[:project])
    instance.add_tag("created_by", :value => @options[:created_by])
  end

  nil
end