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.
47 48 49 50 51 52 |
# File 'lib/xnlogic/deploy.rb', line 47 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
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/xnlogic/deploy.rb', line 29 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 |