|
Version Control Integrations > Microsoft Team Foundation Server Integration |
|
|
Gated Check-in Triggers |
|
Collaborator provides special triggers that fire when someone submits files to a folder that is controlled by a gated check-in process in Team Foundation Server:
These triggers ensure that files cannot be submitted unless a review for the respective changelist has been started (or completed). If the conditions are met, the commit will be allowed to continue normally. The triggers work for Microsoft Team Foundation System 2018, 2017, 2015 and 2013. Currently, Update 1 and Update 1 Release 2 of Team Foundation System 2015 are not supported. The triggers are implemented by dynamic-link libraries that you can download from the SmartBear web site as a .zip archive: https://support.smartbear.com/downloads/collaborator/installers-for-collaborator-14/ Installing Triggers To install the triggers you will need to perform the following steps: 1) Download the .zip archive from the page mentioned above and unpack it to some folder on your computer. 2) Open <Team Foundation Server>\Application Tier\Web Services\web.config file and append the following lines to the <appSettings> section: <appSettings> ... <!-- The following settings are for Collaborator triggers --> <!-- Required setting --> <add key="collab:serverUrl" value="http://yourcollabserver:port" /> <!-- Required setting --> <add key="collab:userName" value="collabUser" /> <!-- Required setting. For an empty password, use value="" --> <add key="collab:userPassword" value="collabPassword" /> <!-- Optional setting. Default is "started" --> <add key="collab:triggerType" value="completed" /> ... </appSettings> 3) Copy the following DLLs from the unpacked dlls\<Your-Visual-Studio-version> folder to the <Team Foundation Server>\Application Tier\Web Services\bin\Plugins folder:
Linking Reviews and Commits To use the triggers, you must require developers to put the review ID somewhere in the TFS commit message. The review ID must be specified in the Review: NNN format, where NNN stands for review number. Here is an example: Commit message example: TFS: Add support for gated check-ins (Review: 12345) Collaborator uses the (@"Review:*\s?(\d+)") regular expression to extract the review id from the commit information. This text can appear inline with other text or in a more formal "form-style" layout. Troubleshooting If you run across any issues or problems, it will help SmartBear technical support if you send in a debugging log. To capture a debugging log: 1) Open <Team Foundation Server>\Application Tier\Web Services\web.config file and append the following lines to the <configSections> section: <configSections> ... <!-- The following setting is for debugging Collaborator triggers --> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> ... </configSections> 2) Also append the the following section to the web.config file: <log4net debug="true"> <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> <param name="File" value="C:/temp/collab_TFS_GatedCheckIn.log" /> <param name="AppendToFile" value="true" /> <layout type="log4net.Layout.PatternLayout"> <param name="Header" value="[Header]\r\n" /> <param name="Footer" value="[Footer]\r\n" /> <param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" /> </layout> </appender> <root> <level value="DEBUG" /> <appender-ref ref="LogFileAppender" /> </root> </log4net> The above settings will generate the debugging log file at specified path. 3) Replace the DLLs in the Plugins folder with their fresh copy. This will force TFS to re-read the web.config file. You may adjust the log output data for your needs by changing the above settings according to log4net convention of configuration files.
|
|
© 2003-2025 SmartBear Software. All rights reserved. |