The series so far:
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.
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
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”:
2. Give your new build a name:
3. Configure the build trigger (notice all the regular options exist):
4. Next, set the build workspace(s) as per normal:
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:
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.
7. Once you’ve set your retention policy, you are good to go.
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.
You can even watch the building process in real-time, just like a non-Cloud-hosted build controller:
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.