Class: DPL::Provider::CloudFoundry
Instance Attribute Summary
#context, #options
Instance Method Summary
collapse
apt_get, #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, #warn
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#check_app ⇒ Object
16
17
18
|
# File 'lib/dpl/provider/cloud_foundry.rb', line 16
def check_app
error 'Application must have a manifest.yml for unattended deployment' unless File.exists? 'manifest.yml'
end
|
#check_auth ⇒ Object
10
11
12
13
14
|
# File 'lib/dpl/provider/cloud_foundry.rb', line 10
def check_auth
initial_go_tools_install
context.shell "cf api #{option(:api)}"
context.shell "cf login --u #{option(:username)} --p #{option(:password)} --o #{option(:organization)} --s #{option(:space)}"
end
|
#cleanup ⇒ Object
29
30
|
# File 'lib/dpl/provider/cloud_foundry.rb', line 29
def cleanup
end
|
5
6
7
8
|
# File 'lib/dpl/provider/cloud_foundry.rb', line 5
def initial_go_tools_install
context.shell 'wget http://go-cli.s3-website-us-east-1.amazonaws.com/releases/latest/cf-cli_amd64.deb -qO temp.deb && sudo dpkg -i temp.deb'
context.shell 'rm temp.deb'
end
|
#needs_key? ⇒ Boolean
20
21
22
|
# File 'lib/dpl/provider/cloud_foundry.rb', line 20
def needs_key?
false
end
|
#push_app ⇒ Object
24
25
26
27
|
# File 'lib/dpl/provider/cloud_foundry.rb', line 24
def push_app
context.shell "cf push"
context.shell "cf logout"
end
|
#uncleanup ⇒ Object
32
33
|
# File 'lib/dpl/provider/cloud_foundry.rb', line 32
def uncleanup
end
|