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
If you don't have any money Perl. If you have lots and lots of money
BuildForge.
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)
$ cat buildallOf 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
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>
#!/bin/bashThere'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...
# 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"
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
"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!
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.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).
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)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?
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 WindowsWhat's a "master environment"?
Armel
"Armel" <armela...@hotmail.com> a écrit dans le message de news:
47e17153$0$853$ba4a...@news.orange.fr...
[...]
> 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.
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!
>> - 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