Building a pipeline using Microsoft MSBuild publishing targets?

1.2k Views Asked by At

I am trying to create a Build Pipeline. I am curious whether I am able to leverage the existing Microsoft publishing msbuild targets or whether I need to write my own from scratch.

I have a large web site project (not web application).

The build pipeline is as follows:

  1. Checkin Occurs
  2. CI triggers build called 01 Commit Stage
  3. 01 Commit Stage automatically triggers 02 Prepare for deployment
  4. 02 Prepare for deployment automatically triggers 03 UAT

Here is what I want to happen at each stage:

  • 01 Commit Stage
    • All project files are built
    • Unit Tests are run
    • The website is run through the AspNet_Compiler
  • 02 Prepare for deployment
    • Output from previous build is used
    • Output is then run through AspNet_Merge.exe to merge the compiled dlls into a single versioned assembly.
    • Store output artifacts as deployable
  • 03 UAT
    • The artifacts from the previous step are deployed to QA for testing.

My Question is:

In the second build, how do I skip the build target and simply point the existing Microsoft publishing pipeline to the existing output? Or would I just be better building my own set of MSBuild targets to do exactly what I need?

So far, I have had most joy with building my own pipeline, but can't help feel that I am missing out on some MS goodness.

1

There are 1 best solutions below

3
On

If you are using TFS 2013 you can use the built in release management tooling to define environments, servers and components to deploy. You then get full traceability, approvals and scheduling of deployments for binary promotion through environments.

http://www.visualstudio.com/en-us/explore/release-management-vs.aspx

if however you are using TFS 2012 you may need a little more help as there is no release Management tools out if he box. You can however use the Workflow based build system with the LabDefaultTemplate to do deploy and test to environments. If you don't want to do that i would recommend using OctopusDeploy instead.

http://nakedalm.com/release-management-with-team-foundation-server-2012/

If you are in TFS 2005/2008 then you are pretty stuck. The only support would be using the pain and suffering that is MSBuild to do deployment or go to third party tools. To be honest, in this position and due to the age of the product i would recommend upgrading to 2012 and then 2013. Use the latest tools... You can still use VS.old to build and create, but you get the new orchestration and tools.