[rex-users] Re: SCM questions

  • From: Franky Van Liedekerke <liedekef@xxxxxxxxxx>
  • To: rex-users@xxxxxxxxxxxxx
  • Date: Mon, 27 Jun 2011 12:31:04 +0200

Hi Jan,

On Mon, Jun 27, 2011 at 11:51 AM, Jan Gehring <jan.gehring@xxxxxxxxx> wrote:
> Hi Franky,
>
>
> On Mon, Jun 27, 2011 at 10:08 AM, Franky Van Liedekerke
> <franky@xxxxxxxxxxxxx> wrote:
>
>> tried it out, and it seems (following the example presented here:
>> https://github.com/krimdomu/rex-scm) that the checkout happens on
>> every target machine and then via rsync the file gets placed in the
>> correct dir. I was under the impression that the checkout would happen
>> only on the rex master server?
>
> Yes, this example has a mistake.
>
> You can split the checkout and the sync in 2 tasks.
>
> ----8<-----8<------
>
> task "checkout", sub {
>    checkout 'static', branch => 'stable';
> };
>
> task "sync", group => "servers", sub {
>    sync 'static/*', '/var/www/html';
> };
>
> task "deploy", sub {
>    do_task [ qw/checkout sync/ ];
> };
>
> And call it with: rex deploy

thanks, this is exactly what I'm looking for. The "LOCAL" solution
would result in as many checkouts as there are servers defined in the
group (it works of course, but with overhead).

Franky

Other related posts: