VSTS TFS Customization

download VSTS TFS Customization

of 37

Transcript of VSTS TFS Customization

  • 8/12/2019 VSTS TFS Customization

    1/37

    Customizing and extending TFS

    Michael Juek Software Architect

    Microsoft s.r.o.

  • 8/12/2019 VSTS TFS Customization

    2/37

    Agenda

    Team Foundation ArchitectureProcess TemplatesWork Item TypesSource Code ControlBuildPortal and reports

  • 8/12/2019 VSTS TFS Customization

    3/37

    Integrated Platform for Collaborating on Software

    Development Projects.

    Version

    Control

    Work Item

    Tracking

    BuildAutomation

    ProjectPortal

    Reporting

    Team Foundation Server

  • 8/12/2019 VSTS TFS Customization

    4/37

    Team Logical Architecture

    Custom reportingtools

    MS ExceMS Projectl

    Team Foundation Data Tier

    Version ControlProxy

    Report Client

    Team Foundation Client Tier

    CoreData

    VersionControlWork Items

    Team BuildData

    SQLReportingServices

    WindowsSharePoint

    Services

    SQLReportingServices

    WindowsSharePoint

    Services

    Work ItemTrackingService

    VersionControlService

    TeamBuild

    Service

    CoreServices

    Warehouse

    Adapters

    Team Foundation App Tier

    WSSProxies

    SQL RSProxies Team Foundation Object Model

    MS ExcelPlug-in

    MS ProjectPlug-inVisual Studio Packages

    Internet Explorer

    BuildProcess

    VersionControlProxy

    Service

    Build Machine

  • 8/12/2019 VSTS TFS Customization

    5/37

    Customization PointsProcess

    TemplateModify, build, orbuy

    Work Item TypesModify or build

    Checkin PolicyModify or build

    Reporting Modify, build, or

    connect differentreport builders

    Project Portal Modify

    Sharepointtemplate

    Extend libraryfolder structure,change or add doctemplates

  • 8/12/2019 VSTS TFS Customization

    6/37

    Extension PointsCore services

    Add a new tool with newartifact types, link types,database, WSs Link to other tools artifacts Raise, subscribe to eventsIntegrate into Team Explorer

    Extend the Project CreationWizard

    Work Item TrackingWrite against OMRespond to events

    Link to Work ItemsIntegrate with WI PickerIntegrate with WI FormSupport for custom controlsin SP1

    Source ControlWrite against OMAdd new file typesupportParticipate in integratedcheck-inDefine new policyRespond to events

    ReportingExtend warehouse withyour own data

    BuildAdd new Build tasksCreate a checkinvalidation system

  • 8/12/2019 VSTS TFS Customization

    7/37

    TFS Administration Toolhttp://www.codeplex.com/Wiki/View.aspx?ProjectName=TFSAdmin

    Policy Override Notification Toolhttp://members.chello.nl/m.dekunst/SubScribeToPolicyViolation.zip

  • 8/12/2019 VSTS TFS Customization

    8/37

    Agenda

    Team Foundation ArchitectureProcess TemplatesWork Item TypesSource Code ControlBuildPortal and reports

  • 8/12/2019 VSTS TFS Customization

    9/37

    Process Templates

    Process TemplatesProject process blueprintPackage of tool settings and templates

    Two included with Team FoundationServerMSF for Agile Software DevelopmentMSF for CMMI Process Improvement

    Modify ours, handcraft your own, orbuy

  • 8/12/2019 VSTS TFS Customization

    10/37

    Process Template

    ProcessTemplate.xml

    Reports

    Work Items

    WorkItems.xml

    Bug.xml

    Template Definition

    Version Control

    VersionControl.xml

    Reports.xml

    BugTrends.rdl

    CustomWIType.xml

    Anatomy of a Process Template

  • 8/12/2019 VSTS TFS Customization

    11/37

    Process Template Project Lifecycle

    Phases and IterationsExit Criteria

    Process Guidance Document TemplatesWork Item Types and Rules

    Bug, Task, RiskWork Packages (Scenario, Feature, Requirement)

    Work itemsWork Item Types (such as Defect, Requirement, Issue, Task, etc)QueriesWork Item Instances/starter tasks

    Windows SharePoint ServicesProcess guidanceWSS Site TemplateWSS Library & Folder StructureDocument templates and all files stored on the Project Portal

    Reports and their folder structureDefault groups and their permissionsClassifications: Areas and IterationsSource Control Settings

  • 8/12/2019 VSTS TFS Customization

    12/37

    Process Template Editorhttp://www.imaginets.com/Default.aspx?tabid=133

    http://www.imaginets.com/Default.aspx?tabid=133http://www.imaginets.com/Default.aspx?tabid=133
  • 8/12/2019 VSTS TFS Customization

    13/37

  • 8/12/2019 VSTS TFS Customization

    14/37

    Agenda

    Team Foundation ArchitectureProcess TemplatesWork Item Types

    Source Code ControlBuildPortal and reports

  • 8/12/2019 VSTS TFS Customization

    15/37

  • 8/12/2019 VSTS TFS Customization

    16/37

    Work Item

    Store

    Work Item Object Model WITXSD

    Work Item TypeXML

    c:\ witimportc:\ witexport c:\ witimport /v

    Validate

    Notepad,ProcessTemplate

    Editor,

    ImportExport

    VisualStudio

    Customizing Work Item Types

  • 8/12/2019 VSTS TFS Customization

    17/37

    How severe the code defect is

    Work Item Type Definition

    NameFields

    Field Rules

    Work FlowStatesTransitionsField Rules

    Form

  • 8/12/2019 VSTS TFS Customization

    18/37

    Work Item Type FieldsField reference names

    Think column name Use in your toolingServer scopeFollow domain name convention

    Microsoft.TeamFoundationServer.WorkItemTracking.Foobar

    System.* reservedField friendly names

    Think column alias Use in your queriesServer scopeCan be renamed, Title->Issue for example

    Field labelsAppear on WI formsLocalizable

  • 8/12/2019 VSTS TFS Customization

    19/37

    Active

    Pending

    Resolved

    Closed

    / Pend

    / Resolve

    / Verify

    / Edit

    / Re-activate

    / Re-activate

    / Resolve

    / Open

    / Edit

    / Edit

    RegressionRe-activate

    Test Failed,Resolution Denied

    Fixed,Defered,Wont Fix ,Duplicate,

    As DesignedNo Repro

    From Customer From QA

    / Re-activate

    Test Passed,Resolution Confirmed

    Fixed

    Wrong Fix

    Fix Ready

    UpdatedBlockedinvestigatingFixing

    TestingReviewing

    / Edit

    Ammended

    Example WI State Diagram

  • 8/12/2019 VSTS TFS Customization

    20/37

    witexport.exe / witimport.exe

  • 8/12/2019 VSTS TFS Customization

    21/37

    WIT Security in TFS 2005

    You can:Set permissions by project areas (in UI)Set permissions for a state transition of WItype (in WI type definition)

    Creating WI is also transition

    You cant: Have item-level permissionsHave field-level permissions

  • 8/12/2019 VSTS TFS Customization

    22/37

    Agenda

    Team Foundation ArchitectureProcess TemplatesWork Item Types

    Source Code ControlBuildPortal and reports

  • 8/12/2019 VSTS TFS Customization

    23/37

    Source Control GotchasSharing and pinning are not supported

    Concurrent check-out by default Limited offline supportNo Get Latest on check-out

    Features only in command lineUndo another users changesFeatures only in TFS Power Toys

    Rollback (but actually Compensate)

    Annotate (also in VS UI)TreeDiff (also in VS UI)Merge on Unshelve

  • 8/12/2019 VSTS TFS Customization

    24/37

    Missing VSS features Branching and Merging is the recommended way butit is not direct equivalent

    Isolation between possibly breaking changesMastering branching and merging is crucial

    PinningBranching and merging enables any and all of the followingscenarios:

    Promotion modeling, Pinning, Frequent Releases, ServicePacks, etc.

    SharingFor VSS-style sharing, put common files in a commondirectory and use Add as Link References with relative pathsIf shared files change often, share source codeIf shared files are DLLs, consider NOT sharing automatically3 rd party products e.g. TFSLinks (ComponentSoftware Inc.)

  • 8/12/2019 VSTS TFS Customization

    25/37

    Check-in policiesIn the TFS box

    Work Items, Tests, Code AnalysisWork Items highly recommended, others areusually impractically restrictive

    Custom:

    Easy - just derive from PolicyBaseWarnings:

    Run on client, not serverEasy to hack by a malicious user

    Collaboration tool, not security measure

    Only type names and parameters on serverNeed to deploy manually to clients

  • 8/12/2019 VSTS TFS Customization

    26/37

    Team Foundation Power Toys http://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=en

    Forbidden Patterns PolicyVisual Studio 2005 SDK

    http://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=3F21144A-4E98-4CE0-830F-D1F3E8AC9D67&displaylang=en
  • 8/12/2019 VSTS TFS Customization

    27/37

    Agenda

    Team Foundation ArchitectureProcess TemplatesWork Item Types

    Source Code ControlBuildPortal and reports

  • 8/12/2019 VSTS TFS Customization

    28/37

    Typical team build

    Initialization Build ServerPreparation

    Source CodeSynch.

    Code ChurnCalculation

    ReportGeneration

    Publishing

    Work ItemsUpdate

    CodeCoverage

    Calculation

    Compilation,Static

    AnalysisUnit Tests

  • 8/12/2019 VSTS TFS Customization

    29/37

    Customizing TFS BuildsSee walkthrough:

    http://msdn2.microsoft.com/en-us/library/ms400767.aspx

    Find the right task:MSBuild - http://msdn2.microsoft.com/en-us/library/7z253716.aspx TFS - http://msdn2.microsoft.com/en-us/library/ms243778.aspx Third-party (mostly freeware)

    See http://msbuildtasks.tigris.org/

    Build your own

    Find the right target (17 out of 35 provided):http://msdn2.microsoft.com/en-us/library/aa337604.aspx

    http://msdn2.microsoft.com/en-us/library/ms400767.aspxhttp://msdn2.microsoft.com/en-us/library/7z253716.aspxhttp://msdn2.microsoft.com/en-us/library/7z253716.aspxhttp://msdn2.microsoft.com/en-us/library/ms243778.aspxhttp://msdn2.microsoft.com/en-us/library/ms243778.aspxhttp://msbuildtasks.tigris.org/http://msdn2.microsoft.com/en-us/library/aa337604.aspxhttp://msdn2.microsoft.com/en-us/library/aa337604.aspxhttp://msdn2.microsoft.com/en-us/library/aa337604.aspxhttp://msdn2.microsoft.com/en-us/library/aa337604.aspxhttp://msbuildtasks.tigris.org/http://msdn2.microsoft.com/en-us/library/ms243778.aspxhttp://msdn2.microsoft.com/en-us/library/ms243778.aspxhttp://msdn2.microsoft.com/en-us/library/ms243778.aspxhttp://msdn2.microsoft.com/en-us/library/7z253716.aspxhttp://msdn2.microsoft.com/en-us/library/7z253716.aspxhttp://msdn2.microsoft.com/en-us/library/7z253716.aspxhttp://msdn2.microsoft.com/en-us/library/ms400767.aspxhttp://msdn2.microsoft.com/en-us/library/ms400767.aspxhttp://msdn2.microsoft.com/en-us/library/ms400767.aspx
  • 8/12/2019 VSTS TFS Customization

    30/37

    Custom Build Task

    MSBuild Sidekick http://www.attrice.info/msbuild/index.htmTeam Build Sidekick http://www.attrice.info/cm/tfs/TeamBuildAddin.htm

  • 8/12/2019 VSTS TFS Customization

    31/37

    Agenda

    Team Foundation ArchitectureProcess TemplatesWork Item Types

    Source Code ControlBuildPortal and reports

  • 8/12/2019 VSTS TFS Customization

    32/37

    Project PortalDependency on WSS:

    WSS must be installed before TFS installation You can remove WSS site creation from processtemplate

    WSS Site per project

    New web parts can be added to the gallerySharepoint templates can be modified orextendedInitial content in Process Template

    You will typically see bug Q915746Contact local MS Support Services for fix

  • 8/12/2019 VSTS TFS Customization

    33/37

    Reporting - High Level Architecture

    Adapter Adapter Adapter Adapter

    Work ItemTracking

    VersionControl

    TeamBuild

    TeamTest

    3 rd PartyData Sources

    Adapter

    Team FoundationRelational Warehouse

    Team FoundationOLAP Warehouse

    OLAP

    Semantic Model

    Adapter

    CommonStructures

    Report BuilderReports

    Report DesignerReports

    ExcelReports

    Report Designer: Precision Layout,Developer-built

    Report Builder: End-user ad-hoccharts and lists with drill-through

    Excel: Portable, familiar,exploratory analytical reports

    d

  • 8/12/2019 VSTS TFS Customization

    34/37

    Integrated Reporting

    *

    * *

    * *

    * * * *

    *

    * *

    *

    ProjectStructure

    IterationStructure

    WorkItem

    Label VersionedItem

    LatestItem

    Version

    Changeset

    Build TestResult

  • 8/12/2019 VSTS TFS Customization

    35/37

    Custom Report in MS Excel

    S

  • 8/12/2019 VSTS TFS Customization

    36/37

    Summary

    TFS is highly customizable andextensible productsMSDN and Visual Studio 2005 SDK areyour primary resourcesMany free and commercial 3 rd partytools

    http://accentient.com/widgets.aspx

    Q i ???

    http://accentient.com/widgets.aspxhttp://accentient.com/widgets.aspx
  • 8/12/2019 VSTS TFS Customization

    37/37

    Questions???