Reputation: 7810
Is there a way that I can see the capistrano task dependency tree? I have a big project that has a lot of tasks and dependencies but I have no clue about the whole picture.
Panayotis
Upvotes: 4
Views: 1002
Reputation: 11102
In Capistrano 3, you can add the --trace
option to the cap command to see all the tasks involved. It is not nicely formatted, but it may help you get a better picture of what's happening.
For example:
$ cap production deploy --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke deploy:set_rails_env (first_time)
** Execute deploy:set_rails_env
** Invoke deploy:set_rails_env
** Invoke deploy (first_time)
** Execute deploy
** Invoke deploy:starting (first_time)
** Execute deploy:starting
** Invoke deploy:check (first_time)
** Execute deploy:check
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
...
If you are using Capistrano 3, you can also try installing my airbrussh gem, which improves the output format of Capistrano to show, among other things, the name of each task as it is being executed. In my experience, airbrussh makes it much easier to understand what the various tasks are doing.
Upvotes: 5
Reputation: 1664
Don't know if there's a way to see your current configuration's tree but this picture of the default execution path has helped me a lot in the past (more available formats) for Capistrano 2.
The getting started flow page has similar information for Capistrano 3.
Upvotes: 2