We've created a set of good old fashioned windows batch scripts which tie together the process of completely rebuilding test systems and their databases. This gives us confidence that when we eventually upgrade a live web system that all the pieces of the upgrade have been well tested. The scripts will take an ASP.NET website offline, upgrade it (code and database) and put it back online all in one script. They can be run with or without a continuous integration server.
You can find the files here: https://gist.github.com/3164291
To rebuild a local development system run rebuild.bat
, to rebuild a QA system run rebuild-QA.bat
which overrides some of the values in the main rebuild file.
Some more details:
- The scripts must be run in a "Visual Studio Command Prompt" for the code build & deployment to work.
- The program relies on SqlHawk to do the database upgrade which must be available on the path.
- You can set environment variables at the command prompt to alter settings without altering