Class: DPL::Provider::Deis
Instance Attribute Summary
#context, #options
Instance Method Summary
collapse
apt_get, #cleanup, #commit_msg, context, #create_key, #deploy, #detect_encoding?, #encoding_for, #error, experimental, #initialize, #log, new, npm_g, #option, pip, requires, #setup_git_credentials, #sha, shell, #uncleanup, #user_agent, #warn
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#check_app ⇒ Object
19
20
21
22
23
|
# File 'lib/dpl/provider/deis.rb', line 19
def check_app
unless context.shell "deis apps:info --app=#{option(:app)}"
error 'Application could not be verified.'
end
end
|
#check_auth ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/dpl/provider/deis.rb', line 11
def check_auth
unless context.shell "deis login #{controller_url}" \
" --username=#{option(:username)}" \
" --password=#{option(:password)}"
error 'Login failed.'
end
end
|
#needs_key? ⇒ Boolean
7
8
9
|
# File 'lib/dpl/provider/deis.rb', line 7
def needs_key?
true
end
|
#push_app ⇒ Object
48
49
50
51
52
53
|
# File 'lib/dpl/provider/deis.rb', line 48
def push_app
wait_until_key_is_set
unless context.shell "git push #{git_push_url} HEAD:refs/heads/master -f"
error 'Deploying application failed.'
end
end
|
#remove_key ⇒ Object
42
43
44
45
46
|
# File 'lib/dpl/provider/deis.rb', line 42
def remove_key
unless context.shell "deis keys:remove #{option(:key_name)}"
error 'Removing keys failed.'
end
end
|
#run(command) ⇒ Object
55
56
57
58
59
|
# File 'lib/dpl/provider/deis.rb', line 55
def run(command)
unless context.shell "deis apps:run #{command}"
error 'Running command failed.'
end
end
|
#setup_git_ssh(path, key_path) ⇒ Object
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/dpl/provider/deis.rb', line 31
def setup_git_ssh(path, key_path)
super(path, key_path)
key_path = File.expand_path(key_path)
add_ssh_config_entry(key_path)
add_git_remote
end
|
#setup_key(file) ⇒ Object
25
26
27
28
29
|
# File 'lib/dpl/provider/deis.rb', line 25
def setup_key(file)
unless context.shell "deis keys:add #{file}"
error 'Adding keys failed.'
end
end
|