5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/dpl/provider/boxfuse.rb', line 5
def deploy
@user = options[:user]
@secret = options[:secret]
@configfile = options[:configfile] || options[:config_file]
@payload = options[:payload]
@image = options[:image]
@env = options[:env]
@extra_args = options[:extra_args]
@param_user = ''
if @user.to_s != ''
@param_user = " -user=" + @user
end
@param_secret = ''
if @secret.to_s != ''
@param_secret = " -secret=" + @secret
end
@param_configfile = ''
if @configfile.to_s != ''
@param_configfile = ' "-configfile=' + @configfile + '"'
end
@param_payload = ''
if @payload.to_s != ''
@param_payload = ' "' + @payload + '"'
end
@param_image = ''
if @image.to_s != ''
@param_image = " -image=" + @image
end
@param_env = ' -env=test'
if @env.to_s != ''
@param_env = " -env=" + @env
end
@param_extra_args = ''
if @extra_args.to_s != ''
@param_extra_args = " " + @extra_args
end
context.shell "curl -L https://files.boxfuse.com/com/boxfuse/client/boxfuse-commandline/latest/boxfuse-commandline-latest-linux-x64.tar.gz | tar xz"
@command = "boxfuse/boxfuse run" + @param_user + @param_secret + @param_configfile + @param_payload + @param_image + @param_env + @param_extra_args
context.fold("Deploying application") { context.shell @command }
end
|