I am trying to improve our general automation process. We use VS2012 and TFS2012.
Here is what I want to happen upon checkin to our CI branch:
- BUILD
- Build the selected projects / solutions as configured in the build definition settings.
- Generate a deployment package that can be used to deploy the websites (without having to rebuild the entire project again)
- Generate a nuget package that can later be published (without having to rebuild the entire project again, i need the dlls to match the symbols created from indexing so we can debug them)
- TEST - IF AND ONLY IF BUILD WAS SUCCESSFUL
- Run all configured unit tests.
- DEPLOY - IF AND ONLY IF ALL UNIT TESTS PASS This is to prevent breaking changes entering our development environment
- Take deployment package from (1.2) and publish it to it's intended environment (hopefully configured using Publishing Profiles and transforms)
- PUBLISH - IF AND ONLY IF ALL UNIT TESTS PASS
- Take nuget package from (1.3) and publish it to our private nuget gallery
I don't need a full tutorial (although that would be awesome) for the entire process, but more how to go about integrating it.
For instance:
- Should I use msbuild on a wrapper project?
- How do I deal with creating the packages upon build on the TFS build server?
- How can I enforce the "IF AND ONLY IF ALL UNIT TESTS PASS" constraints?
- What is the best / easiest way to perform the deployment /publishing after as part of the build.
This is the process we want to use and any help is realising this is very much appreciated. And I'm sure many other people are interested in how to set about integrating this style of process.
Also if it's relevant most solutions have a mix of shared dll projects, websites / apis, and unit tests. One of the reasons I want this process is to be able to split them up and modularise our large dlls into smaller isolated units, which would be to unmanageable ATM without this auto publish mechanism.
Thanks, Gary.