It's hacky but I've done something like this before: I call this pattern
cannibalistic capistrano.
task :p1 do
set :repository, '....xyz'
server ....
end
task :p2 do
set :repository, '....abc'
server ....
end
task :both do
namespace :deploy do
task :default do; end
end
%w(p1 p2).each do |stage|
run_locally "cap #{stage} deploy"
end
end
You should be able to do any of the following:
cap p1 deploy
cap p2 deploy
cap both deploy
On Jun 8, 2012, at 8:52 AM, Shrinath M <[email protected]> wrote:
> And how would I do that?
> Make a custom task and call deploy twice in it with different repo settings?
>
> On Fri, Jun 8, 2012 at 8:25 PM, Donovan Bray <[email protected]> wrote:
> My first reaction is that you will have to do two deploys ie in two stages
> one for each repo.
>
> On Jun 7, 2012, at 11:30 PM, shrinath_m2 <[email protected]> wrote:
>
>> Hi all,
>>
>> I have a specific requirement:
>>
>> We have 10 machines on which specific codes are deployed.
>> Codes are in SVN.
>> Out of those 10, we sometimes want 1 or 2 of the machines to point to a
>> different SVN repo/path.
>> I have all the server IPs in mysql, I fetch them into my recipe using
>> queries to db, then loop and add them to role :app.
>> Now with the above mentioned requirements, I thought of adding SVN repo URL
>> to the mysql too, so that every IP has the associated SVN URL that shall be
>> deployed to it.
>>
>> Now how do I switch repo dynamically in deployment procedure?
>> Any suggestions welcome.
>>
>> Regards,
>> Shrinath M
>> --
>> * You received this message because you are subscribed to the Google Groups
>> "Capistrano" group.
>> * To post to this group, send email to [email protected]
>> * To unsubscribe from this group, send email to
>> [email protected] For more options, visit this group
>> at http://groups.google.com/group/capistrano?hl=en
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
>
>
>
> --
> Regards
> Shrinath M
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en