Tried that, but there is a problem - calling the "run_locally 'cap deploy'"
does all the initialization from beginning... I don't really want that -
isn't there a way to call "deploy" as a task or something? Like so:
task :a1 do
a2
end
task :a2 do
deploy #calls the default deploy?
end
I should be doing cap -S whatever=wherever a1 and thus starting the
deployment.
I tried the above, but having "deploy" in a task doesn't seem to be doing
anything :(
On Saturday, June 9, 2012 7:26:57 AM UTC+5:30, dbray wrote:
>
> 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:
>>
>>
>> 1. We have 10 machines on which specific codes are deployed.
>> 2. Codes are in SVN.
>> 3. 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