Created
April 23, 2012 00:25
-
-
Save bglusman/2467750 to your computer and use it in GitHub Desktop.
git remote changed for cap deploy git branch issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✈ > cap deploy | |
triggering load callbacks | |
* executing `qa' | |
triggering start callbacks for `deploy' | |
* executing `multistage:ensure' | |
* executing `deploy' | |
* executing `deploy:update' | |
** transaction: start | |
* executing `deploy:update_code' | |
executing locally: "git ls-remote [email protected]:/git/xyz.git qa" | |
command finished in 2025ms | |
* executing "git clone -q [email protected]:user/xyz.git /srv/abc_qa/releases/20120422235632 && cd /srv/abc_qa/releases/20120422235632 && git checkout -q -b deploy 37e19fc08d93a2682b5209dd33ead083e28da6b8 && (echo 37e19fc08d93a2682b5209dd33ead083e28da6b8 > /srv/xyz_qa/releases/20120422235632/REVISION)" | |
servers: ["qa.xyz.org"] | |
[qa.xyz.org] executing command | |
** [qa.xyz.org :: err] git checkout: updating paths is incompatible with switching branches/forcing | |
** Did you intend to checkout '37e19fc08d93a2682b5209dd33ead083e28da6b8' which can not be resolved as commit? | |
command finished in 32356ms | |
*** [deploy:update_code] rolling back | |
* executing "rm -rf /srv/abc_qa/releases/20120422235632; true" | |
servers: ["qa.xyz.org"] | |
[qa.xyz.org] executing command | |
command finished in 135ms | |
failed: "sh -c 'git clone -q [email protected]:user/xyz.git /srv/abc_qa/releases/20120422235632 && cd /srv/abc_qa/releases/20120422235632 && git checkout -q -b deploy 37e19fc08d93a2682b5209dd33ead083e28da6b8 && (echo 37e19fc08d93a2682b5209dd33ead083e28da6b8 > /srv/abc_qa/releases/20120422235632/REVISION)'" on qa.xyz.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
et :default_stage, "qa" | |
require 'capistrano/ext/multistage' | |
set :application, "abc" | |
set :repository, "[email protected]:user/xyz.git" | |
set :local_repository, "[email protected]:/git/abc.git" | |
set :scm, :git | |
set :scm_user, "git" | |
desc <<-DESC | |
Symlinks database.yml file from shared directory into the latest release | |
DESC | |
task :symlink_shared, :roles => [:app, :db] do | |
run "ln -s #{shared_path}/database.yml #{latest_release}/config/database.yml" | |
run "ln -s #{shared_path}/config.yml #{latest_release}/config/config.yml" | |
run "ln -s #{shared_path}/development.sqlite3 #{latest_release}/db/development.sqlite3" | |
end | |
after 'deploy:finalize_update', :symlink_shared | |
namespace :deploy do | |
desc "Restart Application" | |
task :restart, :roles => :app do | |
run "touch #{current_path}/tmp/restart.txt" | |
end | |
[:start, :stop].each do |t| | |
desc "#{t} task is a no-op with mod_rails" | |
task t, :roles => :app do ; end | |
end | |
end | |
namespace :delayed_job do | |
desc "Start delayed_job process" | |
task :start, :roles => :app do | |
run "cd #{current_path}; script/delayed_job start #{rails_env}" | |
end | |
desc "Stop delayed_job process" | |
task :stop, :roles => :app do | |
run "cd #{current_path}; script/delayed_job stop #{rails_env}" | |
end | |
desc "Restart delayed_job process" | |
task :restart, :roles => :app do | |
run "cd #{current_path}; script/delayed_job restart #{rails_env}" | |
end | |
end | |
after "deploy:start", "delayed_job:start" | |
after "deploy:stop", "delayed_job:stop" | |
after "deploy:restart", "delayed_job:restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment