Release Build vs Nightly Build – Key Differences Explained

buildscontinuous integrationrelease

A typical solution is to have a CI (Continuous Integration) build running on a build server: It will analyze the source code, make build (in debug) and run tests, measure test coverage, etc.

Now, another build type usually known is "Nightly build": do slow stuff like create code documents, make a setup package, deploy to test environment, and run automatic (smoke or acceptance) tests against the test environment, etc.

Now, the question:

  • Is it better to have a third separate "Release build" as release build?
  • Or do "Nightly build" in release mode and use it as a release?

What are you using in your company?

(The release build should also add some kind of tag to source control of potential product version.)

Best Answer

A case for having the release build equal to the nightly build is: you want to test exactly the same stuff what you release. You don't want to discover bugs in production which could have been detected in dev testing already.

The difference between release and nightly builds:

  • nightly build is run automatically, well, every night, while release build should be run by hand at certain points in time
  • release build should ideally tag / branch the source code, and possibly deploy the build artifact(s) in a central repo (e.g. when using Maven)

These differences are in practice a few extra options in most build management systems I know. To minimize the chance of human errors, these could be saved e.g. in a batch/script file which takes only the necessary parameters (and validates them).

Related Topic