2

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:

  1. BUILD
    1. Build the selected projects / solutions as configured in the build definition settings.
    2. Generate a deployment package that can be used to deploy the websites (without having to rebuild the entire project again)
    3. 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)
  2. TEST - IF AND ONLY IF BUILD WAS SUCCESSFUL
    1. Run all configured unit tests.
  3. DEPLOY - IF AND ONLY IF ALL UNIT TESTS PASS This is to prevent breaking changes entering our development environment
    1. Take deployment package from (1.2) and publish it to it's intended environment (hopefully configured using Publishing Profiles and transforms)
  4. PUBLISH - IF AND ONLY IF ALL UNIT TESTS PASS
    1. 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.

Gary Doublé
  • 436
  • 4
  • 17
  • With above requirements, you should use Custom Activity to add more steps in BuildProcessTemplate to do the special functionality. – Hoang Nguyen Jun 19 '14 at 00:23

1 Answers1

0

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)

This is out of the box, add deployment profile to your projects, call them 'Release' Add the following to your MSBuild Arguments

/p:DeployOnBuild=true;PublishProfile=Release

you don't have to use Release, as long as your Publish Profiles match what you put in the MSBuild arguments

This will generate the deployment files as part of your build (MSDEPLOY)

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)

See Nugetter on code plex http://nugetter.codeplex.com/

TEST - IF AND ONLY IF BUILD WAS SUCCESSFUL Run all configured unit tests.

Should be out of the box, but you can change the build template to fail the build should compilation be unsucessful, if this suits your needs better.

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

See Nugetter on codeplex as listed above

Just TFS
  • 4,697
  • 1
  • 18
  • 22