Jul 182012
 

The series so far:

Part 1 – Setting up TFS Azure
Part 2 – Configuring Visual Studio to use TFS Azure
Part 3 – Registering Team Build controllers for TFS Azure
Part 4 – Builds in the Cloud (this article)

Introduction

Following on from an earlier series of articles on TFS Azure comes this update.  Recently, Microsoft integrated cloud-based build controllers to streamline the process of getting your automated builds online.

This is an excellent alternative to having to procure and configure your own on-premise build machine, and means that you can create basic build definitions with little overhead.

Where we left off..

In the previous article, we had configured an on-premise build server which hosted and performed local build services for our TFSPreview TFS instance.  This was the only option in the initial release of TFS Azure as there were no cloud based build services available.

New Capability

I recently created a new TFS Team Project to allow some collaboration.  I’d been in discussions last month with local Microsoft TFS expert Grant Halliday, he’d mentioned that there was now a cloud-based build controller option available.

Today I uploaded a very basic solution comprising of a console application and a Unit Test project.  Adding the cloud-based CI capability was easy as pie.

Configuring Your Cloud Build Controller

Simplicity itself. 

1. Once you have a valid solution in source control, simply right click on the Builds item in your Team Explorer and select “New Build Definition”:

image

2. Give your new build a name:

image

3. Configure the build trigger (notice all the regular options exist):

image

4. Next, set the build workspace(s) as per normal:

image

5. This is where it gets interesting.  You configure the build defaults, but there are some interesting options when using the cloud-hosted build controller:

image

Note that “Hosted Build Controller” is in the list of controllers available.  There is also an option which checks build output into source control (no need for a build share!)

6. There are also much the same options for the build process as you’d expect with an on-premise controller – and you can add your own build definitions as per normal.  Note that there is a new definition here also – “AzureContinuousDeployment” which we might touch on in another article.

image 
:

7. Once you’ve set your retention policy, you are good to go.

image

Executing a build

Treat it like any other build controller/build host!  You can manually execute or (if you’ve configured gated check-ins or CI build definitions) just make some changes and commit.

image

You can even watch the building process in real-time, just like a non-Cloud-hosted build controller:

image 

Summary

Couldn’t be easier!  Obviously, if your build process or solution require any special steps you may hit a wall with the hosted build controller.  This capability though, might be useful for selected branches of a large solution in which you wished to place gated check-ins/continuous integration, where the output is unit testing + classes.

All I can say is – this is a step in the right direction.

  3 Responses to “Team Foundation Server in the Cloud (Part 4): Builds in the Cloud”

  1. Very slick Rob, thanks for the heads up.

  2. I am two years late to the party, but anyway,
    There is another way to scale out, have your own TFS build servers in a VM in Azure and tweak them to your heart’s content. Connect this to on-prem TFS and execute build definitions for gated check-in, unit tests, etc.
    Any pit falls you see if we take this route?

    • Actually, that sounds like an excellent solution, especially if you have any special build requirements or exotic project dependencies. Better keep an eye on billing, to ensure that your CI and other builds don’t chew up too many resources.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>