我有一臺Rails應用程序運行在Capistrano 2.5.18和Rake 0.9.2.2機器上。 部署工作得很好。capistrano後鉤不開火
我已經在運行Capistrano 2.12.0和Rake 0.9.2.2的另一臺機器上安裝了相同的應用程序,它運行到一個點 - 複製文件等 - 但不會運行我的後鉤。
我閱讀了有關deploy:symlink任務被更改爲部署:create_symlink,所以我更新了它。
這是剝離下來的配方......
set :ssh_options, { :forward_agent => true }
set :use_sudo, true
set :deploy_via, :copy
set :copy_strategy, :export
set :copy_compression, :gzip
on :load, 'max:deploy:ask_env'
after 'deploy:create_symlink', 'max:deploy:finalize_update' # DOESN'T WORK!!
namespace :deploy do
task :restart do
run "#{sudo :as => admin_runner} touch #{current_path}/tmp/restart.txt"
end
end
namespace :max do
[...]
namespace :deploy do
# NEVER CALLED!!!
desc "Finalizes update by setting permissions"
task :finalize_update do
run "chgrp -R #{admin_group} #{current_release}; exit 0"
end
end
[...]
end
運行該腳本看起來像當最後輸出的位......
* executing `deploy:create_symlink'
* executing "rm -f /home/s-exer1/webapps/max-shared-desktop/application_home/current && ln -s /home/s-exer1/webapps/max-shared-desktop/application_home/releases/20121031124115 /home/s-exer1/webapps/max-shared-desktop/application_home/current"
servers: ["vaomb81"]
[vaomb81] executing command
command finished in 97ms
** transaction: commit
* executing `deploy:restart'
* executing "sudo -p 'sudo password: ' -u s-exer1 touch /home/s-exer1/webapps/max-shared-desktop/application_home/current/tmp/restart.txt"
部署:create_symlink任務運行,然後將其跳轉到部署:重新啓動 - 跳過我的後鉤。
任何有關可能導致此問題的建議?
感謝
工作,我有'Capistrano的v2.14.2'與前和掛鉤似乎後不正在爲'deploy:create_symlink'解僱。你記得你做了什麼修復? –