多个capistrano部署

时间:2012-03-01 20:34:18

标签: ruby-on-rails-3 capistrano

这些任务/步骤中至少有一个顺序错误,我无法确定哪一个。

after "deploy",                 "deploy:migrations"
after "deploy:update",          "newrelic:notice_deployment"
after "deploy:setup",           "deploy:db:setup"   unless fetch(:skip_db_setup, false)
after "deploy:finalize_update", "deploy:db:symlink"
after "deploy:migrations",      "deploy:cleanup"
after "deploy:create_symlink",  "deploy:restart_workers"

可以在某处找到任务的顺序吗? :)

这是事件的顺序,这些事情真让我头疼!

cap staging deploy                                                                                                                                                                                                                                      
  * executing `staging'
    triggering start callbacks for `deploy'
  * executing `multistage:ensure'
  * executing `deploy'
  * executing `deploy:update'
  * executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote git@github.com:bgadoci/WODstack.git master"
    command finished in 2244ms
  * executing `deploy:finalize_update'
    triggering before callbacks for `deploy:finalize_update'
  * executing `deploy:assets:symlink'
    triggering after callbacks for `deploy:finalize_update'
  * executing `deploy:db:symlink'
    triggering after callbacks for `deploy:update_code'
  * executing `deploy:assets:precompile'
  * executing `whenever:clear_crontab'
  * executing `deploy:create_symlink'
  * executing `deploy:symlink'
[Deprecation Warning] This API has changed, please hook `deploy:create_symlink` instead of `deploy:symlink`.
    triggering after callbacks for `deploy:create_symlink'
  * executing `deploy:restart_workers'
    triggering after callbacks for `deploy:update'
  * executing `newrelic:notice_deployment'
  * executing `deploy:restart'
    triggering before callbacks for `deploy:restart'
  * executing `whenever:update_crontab'
    triggering after callbacks for `deploy'
  * executing `deploy:migrations'
  * executing `deploy:update_code'
  * executing `deploy:finalize_update'
    triggering before callbacks for `deploy:finalize_update'
  * executing `deploy:assets:symlink'
    triggering after callbacks for `deploy:finalize_update'
  * executing `bundle:install'
  * executing `deploy:db:symlink'
    triggering after callbacks for `deploy:update_code'
  * executing `deploy:assets:precompile'
  * executing `whenever:clear_crontab'
  * executing `deploy:migrate'
  * executing `deploy:create_symlink'
  * executing `deploy:symlink'
[Deprecation Warning] This API has changed, please hook `deploy:create_symlink` instead of `deploy:symlink`.
    triggering after callbacks for `deploy:create_symlink'
  * executing `deploy:restart_workers'
  * executing `deploy:restart'
    triggering before callbacks for `deploy:restart'
  * executing `whenever:update_crontab'
    triggering after callbacks for `deploy:migrations'
  * executing `deploy:cleanup'

1 个答案:

答案 0 :(得分:0)

答案是部署:迁移实际上运行整个事情。正确的部署是:在我的场景中迁移