Skip to content

Commit

Permalink
created do_deploy function to match rake tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jkutner committed Jan 9, 2012
1 parent 97dc616 commit 2247103
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/torquebox/remote_deploy_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ def stage(archive_file)
def deploy(archive_file)
with_config(archive_file) do |config, app_name|
scp_upload(config, archive_file, "#{config.torquebox_home}/jboss/standalone/deployments/")
ssh_exec(config, "touch #{config.torquebox_home}/jboss/standalone/deployments/#{app_name}.dodeploy")
do_deploy(config, app_name)
end
end

def deploy_from_stage(archive_file)
with_config(archive_file) do |config, app_name|
ssh_exec(config, "cp #{config.torquebox_home}/stage/#{app_name}.knob #{config.torquebox_home}/jboss/standalone/deployments")
ssh_exec(config, "touch #{config.torquebox_home}/jboss/standalone/deployments/#{app_name}.dodeploy")
do_deploy(config, app_name)
end
end

def undeploy(archive_file)
with_config(archive_file) do |config, app_name|
ssh_exec(config, "rm #{config.torquebox_home}/jboss/standalone/deployments/#{app_name}.*")
ssh_exec(config, "rm -f #{config.torquebox_home}/jboss/standalone/deployments/#{app_name}.knob*")
end
end

Expand All @@ -48,6 +48,10 @@ def prefix(config)
config.sudo ? "sudo" : p
end

def do_deploy(config, app_name)
ssh_exec(config, "touch #{config.torquebox_home}/jboss/standalone/deployments/#{app_name}.knob.dodeploy")
end

def app_name(archive_file)
File.basename(archive_file, ".knob")
end
Expand Down

0 comments on commit 2247103

Please sign in to comment.