2012/09/12

20120912-程式-TFS Check In 驗証



以下由別人Blog COPY 過來,有空再看:
============================================
投影片:http://docs.com/92AP

客製化簽入原則 (Custom CheckIn Policy)
http://dotnetframework.blogspot.tw/2010/10/team-foundation-server-2010-custom.html

google:簽入原則
http://goo.gl/Ae4BI

http://jeanpaulva.com/2012/03/23/tfs-2010-how-to-set-check-in-policy/

TFS 2010 – How to set Check-in Policy

Posted by Jean Paul on March 23, 2012
This article demonstrate how to enable Source Code Check-in Policy inside TFS 2010.
image
Following are the default policies available with TFS:
PolicyDescription
BuildsThis policy requires that the last build was successful for each affected continuous integration build definition.
Code AnalysisThis policy requires that Code Analysis is run before check-in.
Testing PolicyEnsures that tests from specific test lists are successfully run before checking in.
Work ItemsThis policy requires that one or more work items be associated with every check-in.

image
Step 1) Install New Policy
We can try adding a new policy that ensures Comments are associated with public methods/properties.
This is a third party plugin and you can download it from CodePlex using the following link:
Use the Download link to download and install the policy executable.  You need to restart Visual Studio after the installation.
image
Step 2) Open Team Explorer inside Visual Studio
image
Step 3) Open Source Control Dialog
image
Step 4) Click add button from the Check-in Policy tab
image
Step 5: Select Check for Comments item
image
Click Ok button
image
Please note that the above dialog says we have selected only Public Methods for comment requirement.
Step 6: Test the Check-in
Now we can try creating a file with comment missing for a public method.
image
Try checking in the file:
image
On checking in the above file we will get the following error dialog.
image
This makes sure that the Policy was Installed Successfully.
Summary
In this article we have explore the source code policy feature of Team Foundation Server and installing a custom Check-in policy

0 意見 :

張貼留言