Class: DPL::Provider::Boxfuse
- Inherits:
-
DPL::Provider
- Object
- DPL::Provider
- DPL::Provider::Boxfuse
- Defined in:
- lib/dpl/provider/boxfuse.rb
Instance Attribute Summary
Attributes inherited from DPL::Provider
Instance Method Summary collapse
Methods inherited from DPL::Provider
apt_get, #check_app, #cleanup, #commit_msg, context, #create_key, #default_text_charset, #default_text_charset?, deprecated, #detect_encoding?, #encoding_for, #error, experimental, #initialize, #log, #needs_key?, 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
#deploy ⇒ Object
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 = [:user] @secret = [:secret] @configfile = [:configfile] @payload = [:payload] @image = [:image] @env = [:env] @extra_args = [: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 |