Class: DPL::Provider::ElasticBeanstalk

Inherits:
DPL::Provider show all
Defined in:
lib/dpl/provider/elastic_beanstalk.rb

Constant Summary collapse

DEFAULT_REGION =
'us-east-1'

Instance Attribute Summary

Attributes inherited from DPL::Provider

#context, #options

Instance Method Summary collapse

Methods inherited from DPL::Provider

apt_get, #cleanup, #commit_msg, context, #create_key, #deploy, #detect_encoding?, #encoding_for, #error, experimental, #initialize, #log, new, npm_g, #option, pip, requires, #run, #setup_git_credentials, #setup_git_ssh, #sha, shell, #uncleanup, #warn

Constructor Details

This class inherits a constructor from DPL::Provider

Instance Method Details

#check_appObject



19
20
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 19

def check_app
end

#check_authObject



15
16
17
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 15

def check_auth
  AWS.config(access_key_id: option(:access_key_id), secret_access_key: option(:secret_access_key), region: region)
end

#needs_key?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 11

def needs_key?
  false
end

#push_appObject



22
23
24
25
26
27
28
29
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 22

def push_app
  create_bucket unless bucket_exists?
  zip_file = create_zip
  s3_object = upload(archive_name, zip_file)
  sleep 5 #s3 eventual consistency
  version = create_app_version(s3_object)
  update_app(version)
end