Class: Opsworks::Deploy::Deployment

Inherits:
Object
  • Object
show all
Defined in:
lib/opsworks/deploy/deploy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, client = AWS.ops_works.client) ⇒ Deployment

Returns a new instance of Deployment.



35
36
37
38
39
40
41
42
# File 'lib/opsworks/deploy/deploy.rb', line 35

def initialize(options, client = AWS.ops_works.client)
  @options = {
    migrate: true,
    wait: false,
    env: nil
  }.merge(options)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



33
34
35
# File 'lib/opsworks/deploy/deploy.rb', line 33

def client
  @client
end

#deploymentObject (readonly)

Returns the value of attribute deployment.



33
34
35
# File 'lib/opsworks/deploy/deploy.rb', line 33

def deployment
  @deployment
end

#optionsObject (readonly)

Returns the value of attribute options.



33
34
35
# File 'lib/opsworks/deploy/deploy.rb', line 33

def options
  @options
end

Instance Method Details

#deployObject



44
45
46
47
48
# File 'lib/opsworks/deploy/deploy.rb', line 44

def deploy
  @deployment = client.create_deployment(arguments)
  puts @deployment.inspect
  wait_on_deployment if options[:wait]
end