Class: DPL::Provider::CloudFoundry

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

Instance Attribute Summary

Attributes inherited from DPL::Provider

#context, #options

Instance Method Summary collapse

Methods inherited from DPL::Provider

context, #create_key, #deploy, #error, experimental, #initialize, #log, new, npm_g, #option, pip, requires, #run, #setup_git_credentials, #setup_git_ssh, #sha, shell

Constructor Details

This class inherits a constructor from DPL::Provider

Instance Method Details

#check_appObject



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

def check_app
  error 'Application must have a manifest.yml for unattended deployment' unless File.exists? 'manifest.yml'
end

#check_authObject



6
7
8
9
# File 'lib/dpl/provider/cloud_foundry.rb', line 6

def check_auth
  context.shell "cf target #{option(:target)}"
  context.shell "cf login --username #{option(:username)} --password #{option(:password)} --organization #{option(:organization)} --space #{option(:space)}"
end

#cleanupObject



24
25
# File 'lib/dpl/provider/cloud_foundry.rb', line 24

def cleanup
end

#needs_key?Boolean

Returns:

  • (Boolean)


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

def needs_key?
  false
end

#push_appObject



19
20
21
22
# File 'lib/dpl/provider/cloud_foundry.rb', line 19

def push_app
  context.shell "cf push"
  context.shell "cf logout"
end

#uncleanupObject



27
28
# File 'lib/dpl/provider/cloud_foundry.rb', line 27

def uncleanup
end