Integrate With Trac

compared with
Version 14 by Steve Luo
on Jun 09, 2010 18:42.


Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 3 changes. View first change.

 The integration features:
 * Hyperlink the Trac ticket id in commit messages to corresponding JIRA pages
 * Generate an issues report from commit messages
 * Progress/update the issues from commit messages
 * Release a milestone of a project in Trac
 * Create an issue to Trac based on a customized step condition
  
 This page will describe how to integrate Trac in QuickBuild.
  
 *On This Page*
  
 {toc:class=pagetoc|style=disc|indent=20px|maxLevel=3}
  
 {info}
 Supported Trac version: 0.11 or higher.
 {info}
  
 h3. Simple Integration
  h3. Basic Integration
 To enable the integration:
  
 # *Install and enable XML RPC plugin for Trac.* This plugin and its installation guide can be found at below link:
  http://trac-hacks.org/wiki/XmlRpcPlugin
 # *Configure Trac Server on configuration settings tab.*
  !trac-settings.png!
  Below lists the descriptions of these properties:
  ||Property||Description||
  |Server URL|Defines the server url. you can test it by adding "/rpc", for example, if the server url is: http://localhost/trac/project, open below url in your browser: http://localhost/trac/project/rpc, and if the "Remote Procedure Call (RPC)" page can be displayed correctly, the url is correct. |
  |User Name|The user should have TICKET_VIEW permission. If you want to update issues from QuickBuild, the user should also have TICKET_MODIFY permission.|
  |Ticket Pattern|Defines the ticket pattern which will be used to extract the ticket id from commit messages. The ticket pattern here uses [Java regular expression|http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html] to match the ticket ids. By default, below pattern will match #123 or ticket:123.
  {code}
  (?<!\:)(?:#|ticket:)\d+
  {code}
  |
  
 After doing these, the issues keys mentioned in commit messages will be hyperlinked:
  
 !changes.png!
  
 and a ticket report will be displayed in Build tab:
  
 !issues.png!
  
 you can also find all related issues from a specified version and view the changes for an issue:
 !issues-history.png!
  
 After configured the Trac server in the configuration settings, below steps are available to add in your build workflow:
 * Update Issue Step
 * Release Version Step
 * Create Issue Step
  
 !trac-steps.png!
  
h3. Update Issues Step
  h3. Advanced Integration
 Besides the basic integration, QuickBuild also features:
 * Update tickets mentioned in commit messages directly
 * Cooperate with Trac to manage both Trac and QuickBuild version
 * Release a Trac milestone and also update the milestone field of tickets mentioned in commit messages which can help you to generate the Release Notes easily.
  
 h4. Update Tickets
 To update tickets from the commit messages, *Update Trac Ticket* step should be added to your build workflow. And when QuickBuild find any [commit command|Commit Command] in the commit message, QuickBuild will execute it to update or progress the ticket.
  
 *NOTE:*
  * To update tickets, the user defined in Trac setting should has the TICKET_ADMIN permission.
  * This step should be defined after your checkout step.
  * QuickBuild will update all tickets which are requested from the commit comments from *previous successful* build.
  * If a ticket updated manually after committed, this tickets will not be updated then.
  
 *Customize Commit Command*
  
 The [commit command|Commit Command] can be customized in the step:
 !customize-commands.png!
  
 * Command Attributes*