Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tool to use?

0 views
Skip to first unread message

Armel

unread,
Mar 19, 2008, 4:02:25 PM3/19/08
to
Dear all,

My team builds a software on 4 platforms (Windows, Linux, Solaris and Mac...
and probably more later). Our release pace is not very high so running the
build scripts by hand is somewhat OK. Nonetheless, i'd be interested by
your insight on which tool would be really practical for me.
Basically the tool would need to be able to:
- trigger the start of the builds on the 4 platforms
- follow execution and potentially restart the processes if an intermittent
failure happens (something like network problem)
- wait for the builds to finish, check they succeeded and run some packaging
and auto-test tasks once ended
(the problem for me here is the 'necessarily distributed and multi-platform'
build problem)

is it a "any tool does that" problem? does a tool like 'ant' would do that?
if not, which (free?) tool?
our master environment is Windows

Best regards
Armel


BAR

unread,
Mar 19, 2008, 6:47:56 PM3/19/08
to

If you don't have any money Perl. If you have lots and lots of money
BuildForge.


Andrew DeFaria

unread,
Mar 20, 2008, 2:10:39 AM3/20/08
to
Armel wrote:
My team builds a software on 4 platforms (Windows, Linux, Solaris and Mac... and probably more later).
Really? What's you're software look like? C? Java? C++? Scripts? FORTRAN, Assembly? Give us a clue!

Our release pace is not very high so running the build scripts by hand is somewhat OK.
Define "build scripts". How do you "build" currently? Is this make? .BAT scripts? A series of steps written on paper? Again, give us a clue!

Nonetheless, i'd be interested by your insight on which tool would be really practical for me.

Basically the tool would need to be able to:

- trigger the start of the builds on the 4 platforms
Given the platforms currently, it'd be possible, for example, to ssh to each of the machines and kick off a make. This assumes 1) ssh is available (is for all 'cept Windows but Cygwin could solve that problem for you) and 2) you can initiate the build by merely executing make or some other program that builds your software. This assumes you have a build environment an system such that one can build everything with a simple command. Many, many clients don't even have that down (or not down all that well - which keeps me in business).

- follow execution and potentially restart the processes if an intermittent failure happens (something like network problem)
Restarting of the build from where you left off is not always that easy. What happens in your current, by hand system, if a network problem occurs in the middle?

- wait for the builds to finish, check they succeeded and run some packaging
and auto-test tasks once ended (the problem for me here is the 'necessarily distributed and multi-platform' build problem)
There are lots of approaches to this problem. The simplest would be a serial blocking build. IOW, in semi pseudo code:
$ cat buildall
#!/bin/bash
ssh window_build_host  "cd builddir; make all"
ssh linux_build_host   "cd builddir; make all"
ssh solaris_build_host "cd builddir; make all"
ssh mac_build_host     "cd builddir; make all"
<run packaging tool>
Of course, parallelizing this so that you are building on all platforms at the same time requires much more coordination. Also, error checking requires coordination. If your goal is to produce a release you may not want to build the Linux version if the Windows version has errors. And you probably don't want to package anything unless everything built successfully. Additionally, what about testing?!? Often you'll build things, have no errors and want to run a santity suite of tests first and only after that, and an acceptable level of errors if any, attempt any packaging. So a more full example might be something like:
#!/bin/bash

# Build for Windows
if [ !-f windows_image ]; then
   ssh windows_build_host "cd builddir; make all"

   if [ $? -ne 0 ]; then
     echo "Windows build failed. Bailing out!"
     exit 1
   else
     echo "Windows build successful"
   fi
else
  echo "Windows build already done"
fi

# Build for Linux
if [ !-f linux_image ]; then
   ssh linux_build_host "cd builddir; make all"

   if [ $? -ne 0 ]; then
     echo "Linux build failed. Bailing out!"
     exit 1
   else
     echo "Linux build successful"
   fi
else
  echo "Linux build already done"
fi

# Build for Solaris
if [ !-f solaris_image ]; then
   ssh solaris_build_host "cd builddir; make all"

   if [ $? -ne 0 ]; then
     echo "Solaris build failed. Bailing out!"
     exit 1
   else
     echo "Solaris build successful"
   fi
else
  echo "Solaris build already done"
fi

# Build for Mac
if [ !-f mac_image ]; then
   ssh mac_build_host "cd builddir; make all"

   if [ $? -ne 0 ]; then
     echo "Mac build failed. Bailing out!"
     exit 1
   else
     echo "Mac build successful"
   fi
else
  echo "Mac build already done"
fi

# Run santity tests: Assumes the following is a script that does that.

run_santity_tests

if [ $? -ne 0]; then
  echo "Didn't pass basic santity tests!"
  exit 1
fi

echo "Everything built and passed santity! Ship it!"

# Run packaging script: Again, assumes the following is a script that
# does that.
run_packaging

echo "Packaging done"
There's a reason that companies often hire a Build Release Engineer. Sounds to me like you're trying to cut corners here. What I've never understood is why companies so often hire contractors (such as myself) for Release Engineering. My first, internal, thought is always "What? Don't you guys know how to build your software better than any outsider would?" but I'm beginning to believe that they contract this out because nobody in their employ has enough vision, know how or wants to be that visible of a target. Whatever the reason, it often pays the bills for me...

is it a "any tool does that" problem? does a tool like 'ant' would do that?
Ant's for java. No tool can make a messy or non-existent build process into a slick coordinated build process. Often tools provide you with a direction with which to organize your environment (to fit to tool you spent tons of money on) to.

if not, which (free?) tool? our master environment is Windows
What's a "master environment"?

Nothing in life is free son. Somethings have lower cost (or you can look at it as some things are a bigger waste of money than others). Over the years I've found that good old make + organization + some blood, sweat & tears along with a building of a coordinated build environment is the best thing. While cheap in terms of cost of COTS software, it's expensive in terms of home grown effort. Yet in the end it will do the best job because it's, by definition, custom fit. That's why the question of "what do you have currently" is so important. I suspect you don't have much.

Good luck.
--
ClearSCM, Inc.
Andrew DeFaria, President

If you're living on the edge, make sure you're wearing your seat belt.

Armel

unread,
Mar 20, 2008, 5:56:04 AM3/20/08
to
 
"Andrew DeFaria" <And...@DeFaria.com> a écrit dans le message de news: 47e1ffe2$0$89876$815e...@news.qwest.net...
Armel wrote:
My team builds a software on 4 platforms (Windows, Linux, Solaris and Mac... and probably more later).
Really? What's you're software look like? C? Java? C++? Scripts? FORTRAN, Assembly? Give us a clue!
C++
Our release pace is not very high so running the build scripts by hand is somewhat OK.
Define "build scripts". How do you "build" currently? Is this make? .BAT scripts? A series of steps written on paper? Again, give us a clue!
basically we have a configure script for each platform. Then we have a 'prepare-release' script which builds (make based) all the needed components then builds the installer for that platform and deliver that to some standard place on our network.
Nonetheless, i'd be interested by your insight on which tool would be really practical for me.

Basically the tool would need to be able to:

- trigger the start of the builds on the 4 platforms
Given the platforms currently, it'd be possible, for example, to ssh to each of the machines and kick off a make. This assumes 1) ssh is available (is for all 'cept Windows but Cygwin could solve that problem for you) and 2) you can initiate the build by merely executing make or some other program that builds your software. This assumes you have a build environment an system such that one can build everything with a simple command. Many, many clients don't even have that down (or not down all that well - which keeps me in business).
- follow execution and potentially restart the processes if an intermittent failure happens (something like network problem)
Restarting of the build from where you left off is not always that easy. What happens in your current, by hand system, if a network problem occurs in the middle?
given the two phases, 'configure' then 'build', if it fails in first phase we have to restart completely that part, but in the second, we can just re-execute again.
we will handle the job by ourself. our existing build suite is already rather effiicient, it's just that i'm not really an expert of ssh and tools of that sort, as I come from the windows world I always dream of the 'super tool you just have to install...' and I actually often terminate with the "let's script everything in sh" approach because this is a good totally portable approach, and having a near zero-cost for new platform is important for us (it is acceptable to adapt somewhat, but not to go a totally different way).
is it a "any tool does that" problem? does a tool like 'ant' would do that?
Ant's for java. No tool can make a messy or non-existent build process into a slick coordinated build process. Often tools provide you with a direction with which to organize your environment (to fit to tool you spent tons of money on) to.
we really want a tool to "just" coordinate the distributed build, not to rewrite all our build process.
if not, which (free?) tool? our master environment is Windows
What's a "master environment"?
the one from which we will run the coordinating process.


>Nothing in life is free son. Somethings have lower cost (or you can look at it as some things are a bigger waste of money than >others). Over the years I've found that good old make + organization + some blood, sweat & tears along with a building of a >coordinated build environment is the best thing. While cheap in terms of cost of COTS software, it's expensive in terms of home >grown effort. Yet in the end it will do the best job because it's, by definition, custom fit. That's why the question of "what do you >have currently" is so important. I suspect you don't have much.

>Good luck.
 
thank you for your help

Armel

unread,
Mar 20, 2008, 5:56:59 AM3/20/08
to
thank you all :)

Armel

"Armel" <armela...@hotmail.com> a écrit dans le message de news:
47e17153$0$853$ba4a...@news.orange.fr...

Bruce Stephens

unread,
Mar 20, 2008, 6:24:17 AM3/20/08
to
"Armel" <armela...@hotmail.com> writes:

[...]

> Basically the tool would need to be able to:
> - trigger the start of the builds on the 4 platforms
> - follow execution and potentially restart the processes if an intermittent
> failure happens (something like network problem)
> - wait for the builds to finish, check they succeeded and run some packaging
> and auto-test tasks once ended
> (the problem for me here is the 'necessarily distributed and multi-platform'
> build problem)
>
> is it a "any tool does that" problem? does a tool like 'ant' would do that?
> if not, which (free?) tool?
> our master environment is Windows

You'll need (if you're thinking about ant) two tools: one to do the
building (installing, etc.) in a scripted way, and the other one to
trigger and track builds.

For the latter, buildbot's the usual (free) way to do it, I think.

I'm also curious about other tools that can do this. The catch with
most I looked at is that they weren't as multiplatform as buildbot.

The catch for buildbot is that it needs some bits of Twisted, so on
platforms other than GNU/Linux it can take a bit of work to get built.
While getting it to work, it all feels more complex than the job needs
to be.

Jorgen Grahn

unread,
Mar 28, 2008, 8:43:46 AM3/28/08
to
On Wed, 19 Mar 2008 21:02:25 +0100, Armel <armela...@hotmail.com> wrote:
> Dear all,
>
> My team builds a software on 4 platforms (Windows, Linux, Solaris and Mac...
> and probably more later). Our release pace is not very high so running the
> build scripts by hand is somewhat OK. Nonetheless, i'd be interested by
> your insight on which tool would be really practical for me.
> Basically the tool would need to be able to:
> - trigger the start of the builds on the 4 platforms
> - follow execution and potentially restart the processes if an intermittent
> failure happens (something like network problem)

Hm - does that happen very often, in a way which "just restart the
build" can recover from? Not in my (limited) experience.

> - wait for the builds to finish, check they succeeded and run some packaging
> and auto-test tasks once ended
> (the problem for me here is the 'necessarily distributed and multi-platform'
> build problem)
>
> is it a "any tool does that" problem? does a tool like 'ant' would do that?
> if not, which (free?) tool?
> our master environment is Windows

If it had been Unix (i.e. all of your platforms but Windows), I would
have suggested standard cron(8) and make(1) (or whatever make-like
tool you use to build, package and drive test).

If you accept that four reports are waiting in the mail in the morning
rather than one, that takes care of all your non-Windows problems. Or
at least it seems that way to me.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!

Armel

unread,
Mar 28, 2008, 9:40:42 AM3/28/08
to

"Jorgen Grahn" <grahn...@snipabacken.se> a écrit dans le message de news:
slrnfupq02.2...@frailea.sa.invalid...

> On Wed, 19 Mar 2008 21:02:25 +0100, Armel <armela...@hotmail.com>
> wrote:
>> Dear all,
>>
>> My team builds a software on 4 platforms (Windows, Linux, Solaris and
>> Mac...
>> and probably more later). Our release pace is not very high so running
>> the
>> build scripts by hand is somewhat OK. Nonetheless, i'd be interested by
>> your insight on which tool would be really practical for me.
>> Basically the tool would need to be able to:
>> - trigger the start of the builds on the 4 platforms
>> - follow execution and potentially restart the processes if an
>> intermittent
>> failure happens (something like network problem)
>
> Hm - does that happen very often, in a way which "just restart the
> build" can recover from? Not in my (limited) experience.
it happened to work many times here when just building through make but it's
clear that it may not be very reliable for a totally automated build (it's
easy when running the script by hand to see if everything works or if it
breaks, where it breaks).

>> - wait for the builds to finish, check they succeeded and run some
>> packaging
>> and auto-test tasks once ended
>> (the problem for me here is the 'necessarily distributed and
>> multi-platform'
>> build problem)
>>
>> is it a "any tool does that" problem? does a tool like 'ant' would do
>> that?
>> if not, which (free?) tool?
>> our master environment is Windows
>
> If it had been Unix (i.e. all of your platforms but Windows), I would
> have suggested standard cron(8) and make(1) (or whatever make-like
> tool you use to build, package and drive test).

Windows as a cron like service (called "planed tasks", nb: just a
translation of mine of "Taches planifiees"), so it could be a possible
technic as well.

> If you accept that four reports are waiting in the mail in the morning
> rather than one, that takes care of all your non-Windows problems. Or
> at least it seems that way to me.

I note this idea, it could be reasonable and rather simple.

>
> /Jorgen
>
> --
> // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
> \X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!

thanks
Armel


0 new messages