views:

99

answers:

4

I'll start to write a automated build/deploy script for our software team, and I'm not sure which scripting language or tool to use. I'm always eager to learn something new and improve my value on the current software market, so what language do you propose? In the past, I used windows batch files, which are kind of ugly to read and script.

Here are few words as of my requirements and environment:

  • developing under Win XP using Visual Studio 2008 (C++)
  • subversion
  • looking for easy to learn & use scripting language
  • programming experience in PHP & Ruby & C++

I want the script to

  • checkout
  • clean & build many projects
  • check for errors rinse and repeat until no errors or timeout
  • run unittests and evaluate results (text parsing)
  • zip a bunch of dlls/exe and copy to server
  • brew a cup of coffee if possible

Thanks for any suggestions. Could be a community wiki since there's no definite answer, not sure about that...

EDIT:

Found those discussions, but they are a little older and perhaps outdated:
http://stackoverflow.com/questions/24580/how-do-you-automate-a-visual-studio-build
http://stackoverflow.com/questions/16550/best-net-build-tool

+1  A: 

I would recommend python for this sort of generic scripting task; it's a relatively easy language to learn and very flexible.

In particular, you would use the subprocess module to call all the external programs that you need; it makes capturing their output and controlling them very straightforward.

Autopulated
+1  A: 

I'm currently using Apache Ant combined with MPC (home brewed cross platform project) after successfully using the combination at one of my previous jobs, though XML does not quite qualify as a scripting language. But except for the cup of coffee it can do everything on your list. MPC is written in Perl and it's pretty flexible e.g. it allows you to specify postbuild and prebuild actions for VS projects.

EDIT: I was just browsing the site and stumbled on this question; see the answer about FinalBuilder (I'm considering giving it a try; you'd have to pay for it though)

celavek
FinalBuilder looks interesting, I'll download the demo and give it a try
nabulke
+1  A: 

It was briefly mentioned, I like PERL for these sorts of things. On an absolutely humongous project I worked on, we had perl scripts practically running the entire build process. It even built classes based upon messaging templates. It was pretty cool, and this was a Windows project to boot.

CPAN provides an enormous resource.

HTH

JustBoo
Perl is very similar to PHP, isn't it?
nabulke
I know little PHP, but I do hear about the "three P's" Perl, Python and PHP, (I believe those are it) in the same sentence fairly frequently. I think that's the "P" in the LAMP stack.
JustBoo
I bet I've used python systems that do more than your perl one did ;)
Autopulated
And I bet it still hasn't finished. Mooolasses wha wha wha...
JustBoo
A: 

I'd suggest setting up a CI server (Hudson?) and use this to control all deployments to both your QA and production servers. This forces you to automate all aspects of deployment and ensures that the are no ad-hoc restarts of the system by developers.

I'd further suggest that you consider publishing your build output to a repository manager like Nexus , Artifactory or Archiva. In that way deployment scripts could retrieve any version of a previous build. The use of a repository manager would enable your QA team to certify a release prior to it's deployment onto production.

Finally, consider one of the emerging deployment automation tools. Tools like chef, puppet, ControlTier can be used to further version control the configuration of your infrastructure.

Mark O'Connor
I understand you're not doing Java development. Hudson can build anything that has a command line. Repository managers like Nexus can store non java artifacts. Finally tools like chef and puppet are written in Ruby.
Mark O'Connor