Customizing TFS 2010 Builds

10,956 views
10,802 views

Published on

Original Link: http://www.edsquared.com/2010/10/06/Speaking+At+The+Visual+Studio+ALM+Virtual+User+Group+About+TFS+2010+Build.aspx

Description:

In TFS 2010, the automated build infrastructure has been revamped to use Windows Workflow Foundation (WF) instead of MSBuild. In this session, we will explore how to customize the default build process template and how to leverage multiple aspects of the workflow implementation for TFS 2010 Build.

We will cover:
• Explore the basics of Windows Workflow Foundation as it is used in TFS 2010 Build
• Review the high-level parts of the default build process template in TFS 2010 Build
• Adding new functionality to the build process using out of the box workflow activities
• Creating variables and process parameters that can be exposed to the end user
• Thoughts about designing & architecting your build process for reuse
• Building a custom activity for use in the build process template
• Deploying the custom activity to all of the build servers in the build farm

Published in: Technology, Sports
1 Comment
1 Like
Statistics
Notes
  • Thanks nice explanation.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
10,956
On SlideShare
0
From Embeds
0
Number of Embeds
1,708
Actions
Shares
0
Downloads
0
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Customizing TFS 2010 Builds

  1. 1. Team Foundation Server 2010<br />Customizing Builds<br />Ed Blankenship<br />Microsoft MVP (TFS, Visual Studio ALM, and VSTS)<br />E-Mail: edb@notionsolutions.com<br />Blog: http://www.edsquared.com/<br />www.notionsolutions.com<br />
  2. 2. About Ed Blankenship<br /><ul><li>Microsoft MVP of the Year
  3. 3. ALM/TFS Consultant at Notion Solutions
  4. 4. Live in Charleston, SC
  5. 5. Blog: http://edsquared.com
  6. 6. Twitter: @EdBlankenship
  7. 7. E-Mail: edb@notionsolutions.com
  8. 8. Author - Wrox TFS 2010 Book: http://bit.ly/TFS2010Book</li></li></ul><li>Agenda<br /><ul><li>Windows Workflow Foundation Primer
  9. 9. Overview of Default Build Process Template
  10. 10. Customizing Process with OOB Activities
  11. 11. Custom Process Parameters and Variables
  12. 12. Building a Custom Activity
  13. 13. Deploying Custom Build Resources
  14. 14. Other Extensibility Options</li></li></ul><li>Windows Workflow Foundation<br /><ul><li>“Flowcharting” for Software Development
  15. 15. Uses VB.NET Syntax
  16. 16. Shapes == Activities
  17. 17. Activities Expose Properties & Can Return Values
  18. 18. Some are Container Activities
  19. 19. TFS Ships with Build & Lab Activities</li></li></ul><li>Default Build Process Template<br /><ul><li>Updates Build Number
  20. 20. Reserves a Build Agent
  21. 21. Cleans Build Machine’s Working Folder
  22. 22. Creates Version Control Label
  23. 23. Gets Source Code from Version Control
  24. 24. Compiles (Multiple Configurations)
  25. 25. Runs Tests
  26. 26. Associates Changesets & Work Items
  27. 27. Analyzes Test Impact
  28. 28. Copies to Drop Folder
  29. 29. Commits Check-In (for Gated Check-In)</li></li></ul><li>Customizing Build Process<br /><ul><li>Make a copy of the default process template.
  30. 30. Customize using TFS Build Activities & Standard Workflow Activities
  31. 31. Architect for Reuse
  32. 32. Parameterize
  33. 33. Validate Conditions
  34. 34. Keep Isolated from Other Builds</li></li></ul><li>Custom Process Parameters<br /><ul><li>Strongly-Typed Parameters Exposed to End User from Process Template</li></li></ul><li>Process Parameter Metadata<br /><ul><li>Display Name
  35. 35. Category
  36. 36. Description
  37. 37. Custom Editor
  38. 38. Required
  39. 39. Visibility
  40. 40. Never
  41. 41. Editing a Build Definition
  42. 42. Queuing a Build
  43. 43. Always</li></li></ul><li>Workflow Variables<br /><ul><li>Strongly-Typed Local Variables
  44. 44. Scoped to a Specific Workflow Region</li></li></ul><li>Common TFS Activities<br /><ul><li>Agent Scope
  45. 45. Write Build Message, Error, Warning
  46. 46. Copy Directory
  47. 47. Find Matching Files
  48. 48. Convert Workspace Items (Server <--> Local)
  49. 49. Invoke Process
  50. 50. Shared Resource Scope</li></li></ul><li>Common WF Activities<br /><ul><li>Sequence
  51. 51. If
  52. 52. Assign
  53. 53. Parallel and Parallel For Each
  54. 54. For Each, While, Do While
  55. 55. Error Handling (TryCatch, Throw)
  56. 56. Switch
  57. 57. Invoke Method</li></li></ul><li>Custom Activities<br /><ul><li>Standard Workflow Activity
  58. 58. Code Activity or XAML-Based
  59. 59. Add TFS Build Attributes
  60. 60. References Needed
  61. 61. Microsoft.TeamFoundation.Build.Client
  62. 62. Microsoft.TeamFoundation.Build.Workflow
  63. 63. Walkthrough Available from Jim Lamb
  64. 64. http://blogs.msdn.com/b/jimlamb/archive/2009/11/18/how-to-create-a-custom-workflow-activity-for-tfs-build-2010.aspx</li></li></ul><li>Custom Activities<br /><ul><li>Mark as Build Activity
  65. 65. HostEnvironmentOption.All
  66. 66. HostEnvironmentOption.Agent
  67. 67. HostEnvironmentOption.Controller</li></li></ul><li>Custom Activities<br /><ul><li>Access to Build Logging Infrastructure
  68. 68. context.TrackBuildMessage
  69. 69. context.TrackBuildError
  70. 70. context.TrackBuildWarning
  71. 71. Use System.ComponentModel Attributes
  72. 72. Browsable
  73. 73. Description
  74. 74. ToolboxBitmap</li></li></ul><li>Deploying Custom Assemblies<br /><ul><li>Set the Version Control Path to Custom Assemblies on Build Controller
  75. 75. Auto Deploy
  76. 76. Controllers
  77. 77. Agents
  78. 78. Developer Machines
  79. 79. Update Infrastructure for New Versions</li></li></ul><li>Community TFS Build Extensions<br /><ul><li>Custom Activities, Process Templates, Tools
  80. 80. Available on CodePlex
  81. 81. http://tfsbuildextensions.codeplex.com/
  82. 82. Request Custom Activities and Vote</li></li></ul><li>Other Extensibility Options<br /><ul><li>Customizing the Build Details View</li></ul>Jason Pricket’s Blog: http://blogs.msdn.com/b/jpricket/archive/2010/08/09/tfs2010-customizing-the-build-details-view-summary-view.aspx<br />
  83. 83. Other Extensibility Options<br /><ul><li>Customizing the Build Log Entry Detail View
  84. 84. Build Information Nodes
  85. 85. Other Build Tools using TFS API
  86. 86. Queuing Builds
  87. 87. Managing Build Retention
  88. 88. Manage Build Queue
  89. 89. Respond to Build Completion Events
  90. 90. Lots more options for Extensibility…</li></li></ul><li>Questions?<br />
  91. 91. www.notionsolutions.com<br />

×