Warning: Creating default object from empty value in /homepages/39/d161420129/htdocs/p373.net/wp/wp-content/themes/p373b/admin/functions.php on line 183
Capistrano Callback Sequence

Capistrano Callback Sequence

Considering how well Capistrano is documented otherwise, I’m surprised there isn’t better documentation on the load order or sequence of the default capistrano tasks.

There Capistrano Deploy Recipe doc, which if you read(and who likes to do that), you can kind of figure it out.  But where are the pictures!  Google didn’t seem to turn up a whole lot, unless if you figure out the right keywords.

So take a look at this:

|-- deploy:update
|---- deploy:update_code
|------ Code update based on the :deploy_via
|------ deploy:finalize_update
|---- deploy:symlink(or deploy:create_symlink) 
|-- deploy:restart

See api rants on github

Now, I (incorrectly) thought that by specifying an after “deploy:update_code” it would run after the update_code task and before the finalize_update task.  But after seeing the above diagram, this is clearly wrong as tasks are nested, not linear.  I’m sure I’m not the only one to make this mistake.


    This entry was posted in Coding, Ruby/Rails, Technology and tagged , , . Bookmark the permalink. Both comments and trackbacks are currently closed.