I don't know how capistrano_multiconfig works, but probably the problem is
related to
http://chrisroos.co.uk/blog/2007-12-06-ruby-rake-invoke-vs-execute

Lee Hambley
http://lee.hambley.name/
+49 (0) 170 298 5667

On 28 April 2015 at 10:49, Chris Ramakers <[email protected]> wrote:

> We're working on a system that allows us to deploy multiple projects at
> once with capistrano. We have 3 systems in place (front, billing, app) that
> all have a separate codebase and are deployed on different servers in
> multiple stages.
>
> Using the capistrano_multiconfig to create one capistrano repo with
> multiple configurations works like a charm. I can run each command
> separately and they all deploy fine to the right server in the right stage.
>
> Now I would like to add a custom task that deploys all the configured
> projects at once with a single command. I've pasted the command code below.
>
> set :projects, ['front', 'billing', 'app']
>
> namespace :deploy do
>     desc 'Deploy all'
>     task :all do
>         set :env, ask('To what environment do you want to deploy?', 
> 'staging');
>         run_locally do
>             fetch(:projects).each { |project|
>                 info "Now deploying #{project} to #{fetch(:env)}"
>                 invoke "#{project}:#{fetch(:env)}"
>                 invoke "deploy"
>             }
>         end
>     end
> end
>
> The issue is that the code above only deploys the first project, the info
> command executes for all iterations of the .each loop but the invocation
> of the deploy command only runs for the first project, after that the
> following two invoke calls just do nothing.
>
> Anyone have an idea?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/b0fff078-e6c3-4828-873d-3d72cccd9ac0%40googlegroups.com
> <https://groups.google.com/d/msgid/capistrano/b0fff078-e6c3-4828-873d-3d72cccd9ac0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLVB3mOZqUYeM4gC900YFUyWJzu6qz-8vazvH9LyUwbWaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to