From the joel test:

Can you make a build in one step?

I've got to say I can't. I'm currently working on a web app that has a spreadsheet list of items that must be carried out in order to deploy. So my question is how can I automate this? Does it have to be organisation wide? Tips/techniques?

  • 3
    It depends what the items in the list are? Ideally, yes you should be able to automate it.
    – Nobody
    Jan 13, 2011 at 12:29
  • 4
    en.wikipedia.org/wiki/Build_automation BTW: Some stay one step is one too much :)
    – Mchl
    Jan 13, 2011 at 12:30
  • All sorts - move files over, script out stored procedures etc - there are 14 steps!
    – billy.bob
    Jan 13, 2011 at 12:31
  • 2
    From a differrent angle, what on the list do you feel you can't automate?
    – Tyanna
    Jan 13, 2011 at 12:42
  • 1
    The question of how to automate a build isn't subjective, and should be asked on Stack Overflow. The question should also have more information on the tasks needed, to get a useful answer. Jan 13, 2011 at 14:58

6 Answers 6


Make can automate the build process into one step. Make can do pretty much what ever you want. I am not sure why sapporo thinks that Make only applies to C/C++. You can use make to run any type of command. It is not even tied to programing though that is what it is typically used for.

  • 2
    make is one of those "swiss army knife" kind of tools; love working with it. Something else to point out where make would be useful is that if you are automating your build/process/etc, and one or more steps depend on another completing successfully, make will stop if that step fails, not allowing those other steps to proceed and possibly cause problems.
    – Will
    Jan 13, 2011 at 14:09
  • 1
    Since many 'nix apps/systems are installed with './configure; make; make install' I think make also doubles up as an installation engine. If it can do that, I'm also sure it can solve the OP's quandry. Jan 13, 2011 at 17:52
  • Make, but the syntax is pretty obscure. To date I've encountered 2 alternatives: SCons (much easier than Make + makedepend) and a tool to automate the creation of the Makefile (proprietary). Jan 13, 2011 at 18:08
  • @JbRWilkinson...like I said make can do pretty much whatever you want ;)
    – Pemdas
    Jan 13, 2011 at 18:15

Depending on your environment, you may want to look at Make (C/C++), Ant/Maven (Java), Gradle (Groovy) - that's the ones I'm familiar with. Chances are high there's a popular solution for your environment.

  • Its an ASP.NET / SQL environment
    – billy.bob
    Jan 13, 2011 at 12:35
  • @m.edmondson - then cruisecontrol.sourceforge.net is probably your way to go
    – bobah
    Jan 13, 2011 at 12:45
  • Another good continuous integration environment for ASP.NET is TeamCity. I've used by CruiseControl and TeamCity and I found TeamCity to be a bit easier to use and a bit more powerful. But that might no longer be the case. Jan 13, 2011 at 13:07
  • NANT is the .NET ANT variant which we've used well as a complement to Cruise Control which I wouldn't use to build code for deployment where you tend to want a few additional things included / tweaked / parameters set and changed and so on. That's what ANT/NANT are good at. Jan 13, 2011 at 17:22
  • I second @Jon Hopkinds suggestion - nant is a great match for your environment. Jan 13, 2011 at 17:53

At work, we use FinalBuilder, which makes it easy to set up a script to automate the entire process: check out code, build everything, run tests, create deployment package, etc.

It's a very good tool, and it recently won the Dr. Dobbs Jolt Award for Change and Configuration Management tools.


Sure there is a way to automate this. With tools like Chef, setting up a brand new freshly-installed server can be as easy as:

knife bootstrap ip.address -N aNameForTheServer -r "role[some functionality]"

In my case some steps executed by that single command are:

  • Install required libraries, programs and Python modules
  • Create new users with specified access privaleges
  • Create new databases, load required schema, set ownership and access rights
  • Download and stage project code and then write out configuration info
  • Bring everything into production mode by launching database servers, setting up cron jobs, etc.

I'm not sure how Chef will perform in your environment as Windows support is listed as "preliminary", but for UNIX-based system it's the bee's knees.

Puppet is a similar system that is a little older than chef and may offer better Windows support.


It's straightforward with Maven in the Java world

mvn clean deploy

In our configuration, this does all the necessary building of the WAR file (pulling in the JAR dependencies as needed), the deployment to the dev web server and creation of canned test data on the dev database. Once that's in place Maven handles the comprehensive functional testing through SeleniumRC to verify the application works.

This single command gets the application fully deployed to the dev server cluster so it's readily available for other developers to immediately work with (assuming it passed the tests). It's unusual for a dev deployment to fail since developers have verified it works locally with mvn clean install.

The snapshot artifact (WAR) is then copied into the Maven repository for sharing with other developers (as per the standard Maven deploy behaviour).

OK, but you've only deployed a snapshot to dev, what about test and production?

The distribution to the test and (later) production servers is handled through the Maven release process which we like to handle manually to ensure that someone is watching for any suspicious output. Testers only work with released artifacts, not snapshots.

Once it's released then a simple build script is used to SFTP the WAR file to the test server cluster, again with someone watching the process to ensure nothing goes wrong.

Finally, after all the testers are happy the unchanged WAR file is SFTP'd up to the failover production server cluster, with someone keeping a close eye and an immediate rollback position in place in case of disaster.


I figured I could check that one off our Joel test so...

I made a build server in python automated it using pychron.

The code was synced with VSS from the command line, build with borland make (most IDEs'll create make files for you whether or not they call them that. Delphi used to pump out make files and call them .BPG files, now they're MSBuild XML files and you can use MSBuild) and the errors were put in an XML file which I just kept adding to.

So.. Just write a batch file and do these things.

  1. Synchronize Code from Source Control
  2. Delete dumb stuff (individual config files for projects) that you know will stop you from being able to build everything.
  3. Build everything (I'd build everything, make all brother).
  4. Log your errors and warning and stuff, but don't stop building. (If you're really smart you'll extract the name of the last person to check in the file that caused the build to break and send him a nastygram)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.