280 likes | 521 Views
DEV310. Team Build 2010: From Build Definition to Custom Workflow Activities in 75 Minutes. Brian A. Randell Senior Consultant. Build Automation is not …. F5. Build Automation is…. Collecting Assembling Validating Auditing. Build automation helps you answer the tough questions.
E N D
DEV310 Team Build 2010: From Build Definition to Custom Workflow Activities in 75 Minutes Brian A. Randell Senior Consultant
Build Automation is… • Collecting • Assembling • Validating • Auditing
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’s value is in making it trivial to take the pulse of your team
Team Build 2010 • Visual Studio 2010 Team Foundation Server Build is the official name of the feature • Core feature of TFS – you don’t buy it on its own • Industrial strength build automation in for the Visual Studio 2010 family • Provides the “F5” experience for your team
New Team Build 2010 Features • New Controller / Agent Architecture • Support for agent tagging • Managed via TFS Administration Console • Gated Check-in • Windows Workflow build engine • MS Build still does compilation • Build workflow with Lab Management
Build Management • Manual process in TFS 2005 • Command-line deletion of builds • Manual management of drops • Team Build 2008 added GUI features to manage builds and their associated artifacts • Team Build 2008 added support retention policy for builds and automatic clean up • Team Build 2010 continues to add new features • Lab Management integration means builds have additional artifacts
Build Notifications • Using the project alerts feature, anyone can subscribe to build notification events • Two events supported out of the box • E-mail notification generated • Build status changes • Build completes • Build Notification Tool ships with Visual Studio 2010
Build Definitions in TFS 2010 • TFS 2005 and 2008 builds were executed by MSBuild • TFS 2010 builds use Windows Workflow Foundation 4.0 • Core compilation still handled by MSBuild
Build Process Templates • Windows Workflow 4.0 templates to define your build process • Build in 2010 doesn’t use a TFSBuild.proj file • When you define a build, you can select a template or create a new one • Done on the Process tab of the build definition
Upgrade Template • Allows you to continue to use TFSBuild.proj files • When you upgrade to TFS 2010 your existing builds are upgraded to use this this template • Allows you can even take advantage of new features like gated check-in and other features
Build Types • At a minimum, use daily builds • Use Continuous Integration if your team and process is mature enough • Create “integration” builds to run before branch creation or merges • Set Associate Changesets and Work Items to False • Need to create as soon as possible • First good build won’t list changesets and work items • Assumption is first build includes everything
Customizing Team Foundation Build 2010 • Team Build can be customized in many ways • Customize build orchestration • Create a custom build process template • Add standard activities to your custom definition • Create custom activities and add them to your definition
Use Process Parameters • Many customizations you performed in earlier releases are now parameterized settings • Parameter defaults can be changed on the build definition after creation
Create a Custom WF Activity • Can be implemented in code or in XAML • Create an Activity Library • Specify any variables and arguments • Test your code • Check-in the assembly to version control and tell your Build Controller where custom assemblies live
Developing Custom Activities • Why? • Unit of encapsulation & re-use • Model custom control flow • Implement custom business logic • Expand vocabulary of activities with domain specific activities • Let’s build one!
Bringing It Together • All of your artifacts are in version control • Changes are driven by work items • Builds assemble artifacts and create snapshots of work completed • Build reports provide point in time view • Use the TFS API to collate data to create release reports and documentation
Summary • Team Build allows for consistent and repeatable builds • Windows Workflow and the MS Build engine support provide for limitless extensibility
DEV Track Resources • http://www.microsoft.com/visualstudio • http://www.microsoft.com/visualstudio/en-us/lightswitch • http://www.microsoft.com/expression/ • http://blogs.msdn.com/b/somasegar/ • http://blogs.msdn.com/b/bharry/ • http://www.microsoft.com/sqlserver/en/us/default.aspx • http://www.facebook.com/visualstudio
Resources • Connect. Share. Discuss. http://northamerica.msteched.com Learning • Sessions On-Demand & Community • Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers http://microsoft.com/technet http://microsoft.com/msdn