Tech·Ed North America 2009 9/7/2018 2:58 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Brian the Build Bunny: Extending Team Foundation Server Build Tech·Ed North America 2009 9/7/2018 2:58 PM Brian the Build Bunny: Extending Team Foundation Server Build Martin Woodward Senior Software Developer Teamprise DTL307 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Martin Woodward martin@teamprise.com @martinwoodward http://www.woodwardweb.com http://www.radiotfs.com
Agenda Overview of Team Foundation Build Extending the Build Definition Using the TFS Build API Listening for Team Build Events Please fill out your evaluations
Build automation is not … F5
Build Automation Helps You Answer The Tough Questions Do our bits create a product? Are we on schedule? Is our product high quality? Build automation makes it trivial to take the pulse of your team
Team Foundation Build 2008 Core feature of TFS – do not pay extra Industrial strength build automation Provides the “F5” experience for your team
Creating a Build Definition 9/7/2018 2:58 PM demo Creating a Build Definition Martin Woodward Senior Software Engineer Teamprise © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Team Foundation Build Key Features Build Management inside IDE Build Triggers (Manual, CI, Scheduled) Reports for status + quality metrics Integrated with VC + WIT Warehouse support for historical trends Build Notifications Managed Object Model
Team Build Architecture Team Foundation Server Calls Build Agent Runs msbuildm.exe SolutionA.sln msbuild.exe BuildDefinition\ TFSBuild.proj msbuild.exe SolutionB.sln Compiles
Build Execution BuildDefinition \ TFSBuild.proj Build Initiated from TFS Prepare build agent and create build number Sync Sources Compile and Analyze Execute Tests Update Work Items Calculate Code Coverage Calculate Code Churn Produce Build Report Copy to Drop Publish Results to TFS Notify Event Subscribers
Customizing the Build Core build defined in TfsBuild.proj Check-out for edit and modify Targets Group tasks together in a particular order Tasks Tasks are operations that live in a managed assembly You can write your own
Customizing the Build Properties pre-defined to control build Targets in Build designed to be overriden IncrementalGet StopOnFirstFailure IncrementalBuild CleanCompilationOutputOnly SkipWorkItemCreation UpdateAssociatedWorkItemsOnBuildBreak SkipLabel SkipGetChangesetsUpdateWorkItems BeforeOnBuildBreak BuildNumberOverideTarget BeforeCompile BeforeEndToEndIteration BeforeTest AfterEndToEndIteration PackageBinaries Before/After everything!
Only 3 Things You Need To Know MSDN Help—Understanding Team Foundation Build Configuration Files http://msdn2.microsoft.com/en-us/library/ms400710(VS.90).aspx Microsoft.TeamFoundation.Build.targets file %ProgramFiles%\MSBuild\Microsoft\VisualStudio\TeamBuild\ Microsoft.TeamFoundation.Build.targets !! NEVER EDIT THIS FILE !! Many custom tasks already published—search before your write your own © Copyright 2006 MCW Technologies, LLC. All Rights Reserved.
Extending the Build Definition 9/7/2018 2:58 PM demo Extending the Build Definition Martin Woodward Senior Software Engineer Teamprise © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Build Extension Resources TFSBuild.com – Build Recipes Build Numbering Creating Installers
Book Recommendation
Team Build Managed API Access to same API used by Team Build Allows you to automate everything done in UI & more Can integrate existing build systems (Nant, Ant, make, Maven etc) into Team Build
Team Build Managed Code API IBuildDefinition TeamProject IQueuedBuild IBuildAgent IBuildDetail IBuildServer TeamFoundationServer ContinuousIntegrationType ISchedule
Martin Woodward Senior Software Engineer Teamprise 9/7/2018 2:58 PM demo Using the TFS Build API Martin Woodward Senior Software Engineer Teamprise © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Build API Resources Build Wallboard Build API By Example http://code.msdn.microsoft.com/buildwallboard Build API By Example http://tinyurl.com/tfsbuild Ant + Maven 2 Build Integration http://labs.teamprise.com
How CI Works Under the Hood notifies Developer submits Wallboard Changeset processes polls Version Control Service Check-in Event raises Database handles Build Service queries handles Build Definitions Build Completion Event queues receives raises Build starts Build Agent services Build Queue
Martin Woodward Senior Software Engineer Teamprise 9/7/2018 2:58 PM demo Brian the Build Bunny Martin Woodward Senior Software Engineer Teamprise © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Build Event Resources Nabaztag Rabbit BunnyLink Code Sample & Links http://www.nabaztag.com BunnyLink Code Sample & Links http://tinyurl.com/behindbrian
Microsoft Visual Studio 2010 Team Foundation Server Windows Workflow core process on top of MSBuild Investments in MSBuild today protected Build API very similar
Team Foundation Build Summary Powerful and tightly integrated build system It is highly customizable using managed code Some extensibility examples to take home
Rock The Build http://www.woodwardweb.com/dotnet/rock_the_build.html
question & answer
Martin Woodward Please fill out your evaluations martin@teamprise.com @martinwoodward http://www.woodwardweb.com http://www.radiotfs.com Please fill out your evaluations
Track Resources Visit the DPR TLC for a chance to win a copy of Visual Studio Team Suite. Daily drawing occurs every day in the TLC at 4:15pm. Stop by for a raffle ticket http://www.microsoft.com/visualstudio http://www.microsoft.com/visualstudio/en-us/products/teamsystem/default.mspx Please visit us in the TLC blue area
Resources www.microsoft.com/teched www.microsoft.com/learning Sessions On-Demand & Community www.microsoft.com/learning Microsoft Certification & Training Resources http://microsoft.com/technet Resources for IT Professionals http://microsoft.com/msdn Resources for Developers www.microsoft.com/learning Microsoft Certification and Training Resources
Complete an evaluation on CommNet and enter to win!
9/7/2018 2:58 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.