Capistrano 3.0 : Task Flow : Rails deployment

Deploy flow

When you run cap production deploy, it invokes the following tasks in sequence:

deploy:starting    - start a deployment, make sure everything is ready
deploy:started     - started hook (for custom tasks)
deploy:updating    - update server(s) with a new release
deploy:updated     - updated hook
deploy:publishing  - publish the new release
deploy:published   - published hook
deploy:finishing   - finish the deployment, clean up everything
deploy:finished    - finished hook

Notice there are several hook tasks e.g. :started, :updated for you to hook up custom tasks into the flow using after() and before().

Flow examples

Continue reading

Advertisements