Class: DPL::Provider::AzureWebApps
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, #run, #setup_git_credentials, #setup_git_ssh, #sha, shell, #uncleanup, #user_agent, #warn
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#check_app ⇒ Object
20
21
|
# File 'lib/dpl/provider/azure_webapps.rb', line 20
def check_app
end
|
#check_auth ⇒ Object
23
24
25
26
27
|
# File 'lib/dpl/provider/azure_webapps.rb', line 23
def check_auth
error "missing Azure Git Deployment username" unless config['username']
error "missing Azure Git Deployment password" unless config['password']
error "missing Azure Web App name" unless config['site']
end
|
#config ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/dpl/provider/azure_webapps.rb', line 4
def config
{
"username" => options[:username] || context.env['AZURE_WA_USERNAME'],
"password" => options[:password] || context.env['AZURE_WA_PASSWORD'],
"site" => options[:site] || context.env['AZURE_WA_SITE']
}
end
|
#git_target ⇒ Object
12
13
14
|
# File 'lib/dpl/provider/azure_webapps.rb', line 12
def git_target
"https://#{config['username']}:#{config['password']}@#{config['site']}.scm.azurewebsites.net:443/#{config['site']}.git"
end
|
#needs_key? ⇒ Boolean
16
17
18
|
# File 'lib/dpl/provider/azure_webapps.rb', line 16
def needs_key?
false
end
|
#push_app ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/dpl/provider/azure_webapps.rb', line 29
def push_app
log "Deploying to Azure Web App '#{config['site']}'"
if !!options[:verbose]
context.shell "git push --force --quiet #{git_target} master"
else
context.shell "git push --force --quiet #{git_target} master > /dev/null 2>&1"
end
end
|