On 2/4/09 11:04 AM, [email protected] wrote:
> Jamis,
>   I've messed around a little bit with something like:
>   cap deploy:server1
>   cap deploy:server2
>   cap deploy:all (Does both the above tasks)
> 
> where I could set all the capistrano variables but couldn't figure out
> how to call the actual 'deploy' task once they were set.
> Do you know how to call 'cap deploy' inside a wrapping task?

'deploy' is actually the namespace, and 'deploy:default' is the actual
task name. Capistrano just lets you execute the namespace by looking
under the covers for the 'default' method in that namespace.

So, to invoke it from another task:

  deploy.default

- Jamis

> 
> Thanks
> 
> On Feb 4, 9:33 am, Jamis Buck <[email protected]> wrote:
>> I'd probably suggest two separate capistrano calls with different stage
>> definitions (using something like the multistage extension).
>>
>> If you do this kind of deploy frequently, you could then wrap the cap
>> calls in a rake task, e.g. "rake deploy_all" would call "cap first
>> deploy" and "cap second deploy".
>>
>> That's the easy way. The hard way is figuring out how to reset the
>> variables that Capistrano cached on the first deploy, so they get
>> reevaluated on the second. People have done this, so it is possible, but
>> I don't recommend it. Too fiddly, for one, and fragile, since it depends
>> on Capistrano internals that are not guaranteed to remain unchanged.
>>
>> Of course, the _third_ option is to just write your own tasks from the
>> ground up, based on the assumption that a deploy can occur to multiple
>> different targets on the servers. This is actually not hard to do, since
>> you don't need to worry about all the special cases that Capistrano
>> does, if you're writing it for you. Don't worry about all the SCM
>> helpers and deployment strategies, just write the tasks to run the exact
>> commands you need to run. You could probably do the whole thing in just
>> a handful of simple tasks. Fewer, even.
>>
>> - Jamis
>>
>> On 2/4/09 10:08 AM, [email protected] wrote:
>>
>>> I'm trying to deploy a rails site to two different directories on my
>>> production server.  What's the best way to do this with Capistrano?
>>> Thanks in advance,
>>> Kevin
> > 


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to