Module: TorqueBox::RemoteDeployUtils
- Defined in:
- lib/xnlogic/deploy.rb
Class Method Summary collapse
-
.change_yml_permissions(archive_name) ⇒ Object
TorqueboxDeployUtils#do_deploy uploads the knob.yml file with 0600 permissions, which prevents the torquebox user from reading it.
- .exec_cmd(archive_name, cmd, pwd = :staged_app) ⇒ Object
Class Method Details
.change_yml_permissions(archive_name) ⇒ Object
TorqueboxDeployUtils#do_deploy uploads the knob.yml file with 0600 permissions, which prevents the torquebox user from reading it. This function will change permissions on the file, and then touch the .dodeploy to trigger a deploy.
54 55 56 57 58 59 |
# File 'lib/xnlogic/deploy.rb', line 54 def self.(archive_name) with_config(archive_name) do |config, app_name| exec_cmd(archive_name, "chmod g+r #{app_name}-knob.yml", :deployments) exec_cmd(archive_name, "touch #{app_name}-knob.yml.dodeploy", :deployments) end end |
.exec_cmd(archive_name, cmd, pwd = :staged_app) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/xnlogic/deploy.rb', line 36 def self.exec_cmd(archive_name, cmd, pwd = :staged_app) with_config(archive_name) do |config, app_name| unless config.local puts cmd dir = case pwd when :deployments "#{config.torquebox_home}/jboss/standalone/deployments" else pwd end ssh_exec(config, "cd #{dir}", "#{cmd}") end end end |