Overview of Team Build
Hi, my name is Khushboo Sharan and I am the Program Manager for the build automation tool in Visual Studio Team Foundation. This is my first blog to you and I have tons to write about Team Build!
You may have heard this in all TeamBuild presentations and talks but nevertheless let me repeat it again (because nothing else fits better J).
One of the goals of Team Build is to provide a ‘build lab out of the box’ experience. As Lori sometime back mentioned– sure you can hit F5 to get that build out but to get a good public ‘team build’ is a very a difficult task - cause you are building all source code in the team project, including changes by the entire development team, on a separate build machine.
A typical public build involves many steps - clean the remote build machine, get the sources from the source control on the build machine, compile, run static analysis, run the build verification or post-build tests and then communicate the build result to the Project Team. Many of you might be doing something similar in your build scripts. What Team Build provides is a very simple way to kick start this build process – you go through a simple five page wizard and what you generate is a build script.
Here is a screenshot of the wizard which helps you do this.
This build script automates the entire build process listed above and more. Once you have an out of the box build process running out of Team Build, you can edit the build script in case you need to further customize or extend the process. To provide this end to end integration described above, Team Build integrates seamlessly with other Team System tools like Team Foundation Source Control, Team Foundation Work Item Tracking, and Team Test .
Once the build process is over –a comprehensive report is generated with information about the build result as well as the general health of the build. Some of the things included in the report are the number of errors and warnings for each build configuration with links to the log files, results of the test runs included in the build, a list of changesets that went into the build and who checked it in (which could be used to detect the cause of failure of a build). Other information like the code coverage of the tests, work items associated with a build are also listed (which could be used to determine the quality of the build). The report has active links to changesets, work items, test results for further details.
Lets take a scenario as an example to illustrate all of this a little better. A developer has just looked at a work item assigned to him and fixes his code. While checking into Team Foundation Source Control, he associates the work item with the checkin. Team Build picks up the source for the nightly build and as a post build step updates the ‘Fixed In’ field of the work item with the build number automatically. The build report which is generated lists all the work items which were associated with this build. The tester looks into it to make sure the work item opened by her was resolved in this build and installs the build for further investigation. This is a small example of an integration points between the Team Foundation Source Control, Work Item Tracking Tool and Team Build.
The following diagram explains the Team Build flow as described above
But what if your organization has a slightly different build process than what Team Build provides out of the box and has some extra build steps? Fortunately, Team Build can be customized to suit your needs. The underlying build engine is MSBuild and most of the steps in the build process are MSBuild tasks. All that you need to do is to write an MSBuild task which executes the extra steps and include it in the build script generated by the wizard. Through some simple editing you can specify the order in which this custom step needs to run.
Well - this was a snapshot of what Team Build has to offer, we will be discussing all this in detail in future blogs. Meanwhile lets hear from you. Let us know your thoughts/feedback /ideas – whatever they may be! We want to hear it all J