team foundation server version control and related topics
TRANSCRIPT
-
8/14/2019 Team Foundation Server Version Control and Related Topics
1/29
Team Foundation Server VersionControl and Related Topics
Adopting Visual Studio Team System 2008
Mickey Williams Director, Center of [email protected]
-
8/14/2019 Team Foundation Server Version Control and Related Topics
2/29
2
Customized to Your Process
Work Item Types
Every organization works differently
You must be able to customize
Each type consist of:
Fields, form, rules, states
Build on standard methodologies MSF Agile
MSF Formal
-
8/14/2019 Team Foundation Server Version Control and Related Topics
3/29
3
Tightly Integrated
Work Item Tracking
Version Control check-in links
MS Project and Excel integrations
Found In/Fixed In Build Integration
Testing Integration
Shared Infrastructure Reporting
Authorization and Security
Project and Iteration Hierarchies
Email alerts
-
8/14/2019 Team Foundation Server Version Control and Related Topics
4/29
Demo - Work Item tracking
-
8/14/2019 Team Foundation Server Version Control and Related Topics
5/29
5
Full featured software configuration management tool
3-Tier ASP.NET web service
Leverages SQL Server 2005
Advanced SCM capabilities
Focuses on key development scenarios
Deeply integrated into VSTS Future direction for version control from Microsoft
Team Foundation Version Control
-
8/14/2019 Team Foundation Server Version Control and Related Topics
6/29
6
All check-in activities in a single UI
Validate and commit source changes
Resolve work items
Send e-mail
Changes encapsulated as a changeset
Files that are checked-in together are versioned together
Applied atomically to the repository
Convenient for managing change
Developer Check-in
-
8/14/2019 Team Foundation Server Version Control and Related Topics
7/297
VisualStudio
Checkin
ValidatePolicies
1
Checkin PolicyEngine
Unit
Testing
WIAs
sociation
Static
Analysis
Custo
mPolicy
Commit
Changes
2
V1V5V4V5
V2V3
Change Set 727012Change Set 727012Change Set 727012
Change Set 727012Change Set 727011
Change Set 727012
WorkItem 33231
UpdateWork Items
3
Events Raised for3rd party sync purposes
ArtifactLink
Check E-mailNotification
4
Workspace
Integration Infrastructure
VersionControl
Work Item
Tracking
Check-in details
-
8/14/2019 Team Foundation Server Version Control and Related Topics
8/29
Demo Integrated Version Control and Work Items
-
8/14/2019 Team Foundation Server Version Control and Related Topics
9/299
Path-space branching
Branches appear to have new server paths
Aids in isolation scenarios
Powerful merging
Merge file adds, deletes, renames, etc.
Computes changes that need merging
Can cherry-pick individual changes
Parallel Development
-
8/14/2019 Team Foundation Server Version Control and Related Topics
10/2910
Capture changes without a check-in
Optionally restore unmodified files
Scenarios:
Interrupted work
Backup/checkpoint work-in-progress
Transfer changes
Code review or buddy test
Innovative Shelving
-
8/14/2019 Team Foundation Server Version Control and Related Topics
11/2911
Shared or exclusive you choose!
Customize for your team project
Customize for file types
Exclusive == Lock on checkout
Latest version required for check-in
Otherwise triggers a merge conflict
Shared Checkout
-
8/14/2019 Team Foundation Server Version Control and Related Topics
12/2912
Source baselines of varying quality
Traditional Promotion Modeling
12 17 19 20
10 18 19 21
foo.cs
bar.cs
Test DevProd
-
8/14/2019 Team Foundation Server Version Control and Related Topics
13/2913
Branches of varying quality
Team Foundation Promotion Modeling
foo.cs
bar.cs
$//Dev
$//Test
$//Prod18
18
foo.cs
bar.cs 13
13
foo.cs
bar.cs 9
9
10
12
15
14
16
15
20
19
22
21
25
25
17
17
23
23
26
26
24
24
27
27
-
8/14/2019 Team Foundation Server Version Control and Related Topics
14/29
Demo Branching, Merging, Shelving
-
8/14/2019 Team Foundation Server Version Control and Related Topics
15/2916
Check-in Policy
Set per-project or in process guidance
Require specific notes
Easily done
Custom check-in policies
Requires some code
-
8/14/2019 Team Foundation Server Version Control and Related Topics
16/2917
Check-in Policy
Commonly asked-for policies
Check-in comment required
See Jim Mannings blog
http://blogs.msdn.com/jmanning
Block file types
Sample included in VS SDK
http://msdn.microsoft.com/vstudio/extend
Require specific comments/names/etc.
Roll your own
Several policies included in TFS Power Tools
http://blogs.msdn.com/jmanninghttp://msdn.microsoft.com/vstudio/extendhttp://msdn.microsoft.com/vstudio/extendhttp://blogs.msdn.com/jmanning -
8/14/2019 Team Foundation Server Version Control and Related Topics
17/2918
Check-in Policy
Policies are just code
Interact with TFS client user
Policy has access to client and server information
Can display UI
Can load and examine source file
Can veto check-in
Well, almost
Subclass PolicyBase
Microsoft.TeamFoundation.VersionControl.Client.PolicyBase
Class must be serializable
Must be registered on each developer desktop
-
8/14/2019 Team Foundation Server Version Control and Related Topics
18/29
Team Build
-
8/14/2019 Team Foundation Server Version Control and Related Topics
19/29
20
An automated build solution that is easy to use Capable of a complete end-to-end build
Seamlessly integrated into VSTS
Fully extensible through standard MSBuildextensibility mechanisms
Supports Continuous Integration
What Is Team Build?
-
8/14/2019 Team Foundation Server Version Control and Related Topics
20/29
21
Overall Architecture of MSBuild and Team Build
.NET Framework
MSBuild.exeVisual Studio
project system
MSBuild (core components)Engine
Tasks
Loggers
.TARGETS
Team FoundationServer
Sourcecontrol
Workitem
tracking
Team Build
Web Service Tasks Loggers .TARGETS
-
8/14/2019 Team Foundation Server Version Control and Related Topics
21/29
22
Build Automation
Out-of-the-box daily build
Good build process is hard to achieve from scratch Sometimes too difficult to attempt
Requires complex combination of skills
Simple processes are easier to adopt
Builds are reproducible Multiple scheduling options
Visual Studio Projects are built directly
Leverages MSBuild
Build report is centrally published
Tight integration with Visual Studio Team System tools
Work Item system
Version Control
-
8/14/2019 Team Foundation Server Version Control and Related Topics
22/29
23
Check-ins can optionally trigger a new build (Continuous Integration scenario)
Check-ins can cause a build to be queued or can be accumulated
Build frequency can be throttled
Builds can be triggered by schedule
Builds can be triggered by script
Useful for some scenarios
Build Options
-
8/14/2019 Team Foundation Server Version Control and Related Topics
23/29
Team Build Demo
-
8/14/2019 Team Foundation Server Version Control and Related Topics
24/29
25
The Task
Executes target(s) in another MSBuild project Runs entirely in-process
Never builds the same target in the same project twice within a build
Used for communication between projects
Gathering information from referenced projects
Building child projects
-
8/14/2019 Team Foundation Server Version Control and Related Topics
25/29
26
public class MakeDir : Task{
private string[] directories;
public string Directories
{
get {return directories;}
set {directories = value;}}
public override bool Execute()
{
foreach (string directory in directories)
{ System.IO.Directory.CreateDirectory(directory);
}
return true;
}
}
MSBuild Task Implementation
-
8/14/2019 Team Foundation Server Version Control and Related Topics
26/29
27
Project-to-Project References
Automatically picks up the right configuration Automatically rebuilds the referenced project if
necessary
Automatically cleans the referenced project when
parent is cleaned Referenced project need not be in the same .SLN
C
-
8/14/2019 Team Foundation Server Version Control and Related Topics
27/29
28
Passing In Properties To The Child Project
The Properties parameter can be used to pass inglobal overriding properties into the child project
Different sets of global properties cause newinstances of the child project to get loaded
-
8/14/2019 Team Foundation Server Version Control and Related Topics
28/29
29
Team BuildArchitecture
Team Foundation Client
Application Tier
Build Machine
Create build type
Start build
View Reports
Team Build Web
Services
MSBuild
DropLocation
Data Tier
Sources
Work items
Team Build data
TeamFoundationwarehouse
-
8/14/2019 Team Foundation Server Version Control and Related Topics
29/29
Questions?