Working with CVS

Version 4 by Robin Shen
on Aug 06, 2009 02:52.


compared with
Current by Robin Shen
on Sep 29, 2009 12:59.


 
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.

 h1. Define CVS repository
 CVS repository can be defined by choosing the CVS menu item from the repository menu as follows:
 !define-cvs-repository.png!
 If you cannot find the CVS menu item, it probably means that CVS plugin has been disabled on [plugin management|Plugin Management] page.
  
 h1. Specify cvs command location
 QuickBuild utilizes the cvs command to interact with CVS repository. If this command is not in system path, you will need to specify location of the command by configuring CVS plugin as below:
 !configure-cvs-plugin.png!
  
 Further more, cvs command location can be specified on a per-node basis by following below steps:
 # Open CVS plugin setting page and define the cvs path property as:
 {code}
 ${node.getAttribute("cvsPath")}
 {code}
 # For each node that does not have cvs command on system path, define the user attribute _cvsPath_ to point to the actual cvs command location like below:
 !cvs-path.png!
 For user agent node, this user attribute can be defined [follow this guide|manage user agent#define user attributes].
  
 Please note that in above example, the _cvsPath_ user attribute is just for demonstration purpose. You can use any other user attribute name.
  
 h1. {anchor:proof build}Proof build support
  
 For general concept of proof build, refer to [proof build|Working with Proof Build]. Here we explain how to set up Subversion repository to support proof build.
  
 h3. Test proof build as administrator
 Since proof build set up is a bit tricky, we first set up proof build for the administrator account and make sure it works before we proceed to enable it for all developers. To set up proof build for administrator, please follow below steps:
 # Login as administrator and download user agent by switching to _My_ tab.
 # Install and start user agent on your own desktop. For testing purpose, please start the agent as a foreground process. On windows, this can be done by running _agent.bat_; on Unix platforms, this can be done by running _agent.sh console_
 # Set up a test configuration on QuickBuild server, and define a CVS repository and enable the proof build option like below:
 !enable-cvs-proofbuild.png!
 # Make sure the cvs command exist in the system path of both server machine and your desktop. If not, please follow the section _Specify cvs command location_ to tell QuickBuild location of cvs command.
 # Add a _repository/checkout_ step into step execution graph and have it checkout from the repository defined above.
  
 Now proof build has been enabled for your account, please try to checkout and edit some files in working copies specified above, and then run the test configuration. If set up correctly, your local change will be picked up and reflected in the build result. A local change tab will also appear to display your uncommitted changes after build finishes. Your uncommitted changes will be committed automatically if build is successful.
  
 h3. Enable proof build for all developers
 Now that we have a concept of how proof build works. In order to get proof build works for all developers, we need to parameterize property _CVS Root_, _CVS Password_, and _Working Copies_ when define proof build support section of the repository, so that different values can be used for different developers. There are two approaches for this:
 # Define configuration variables representing these properties and have them prompt for values when the configuration is manually triggered. For example, we may define below variables:
 !cvs-variables.png!
 And then we can script property _CVS Root_, _CVS Password_, and _Working Copies_ in proof build section to take value of these variables as below:
 ||Property||Value||
  Now that we have a concept of how proof build works. In order to get proof build works for all developers, we need to parameterize various proof build properties, so that different properties can be used for different developers. To do this, you will need to:
 # Define configuration variables like below:
 !variable1.png!
 # Script various properties in proof build section to make use of above variables like below:
 ||Property Name||Property Value||
 |CVS Root|$\{vars.get("cvsRoot")\}|
|CVS Password|$\{vars.get("password")\}|
  |CVS Password|$\{vars.get("cvsPassword")\}|
 |Working Copies|$\{vars.get("workingCopies")\}|
 In this way, these properties will be prompted when your developer run the build. Once they have been input by your developer for the first time, the value will be remembered for subsequent triggers for that user.
 # The second approach is to define user attributes in user agent nodes, and script the above properties to take value of those attributes. For example, you tell your developers to [install user agent|User agent installation guide] and [define the user attribute|Manage user agent#define user attribute] _cvsRoot_, _password_ and _workingCopies_ through their user agents, and reference these attributes by writing property _CVS Root_, _CVS Password_, and _Working Copies_ as:
 ||Property||Value||
 |CVS Root|$\{node.getAttribute("cvsRoot")\}|
 |CVS Password|$\{node.getAttribute("password")\}|
 |Working Copies|$\{node.getAttribute("workingCopies")\}|
  |Update Condition|vars.get("update").asBoolean()|
 |Commit Condition|build.successful && vars.get("commit").asBoolean()|
 |Commit Comment|$\{vars.get("comment")\}|
  
 In this way, various proof build properties will be prompted when your developer run the build. Once they've been input by your developer for the first time, the values will be remembered for subsequent triggers for that user.
  
 At last we suggest to change run mode of the proof build configuration so that multiple builds can run concurrently in order to get fast feedback in case multiple developers requesting proof build in the same time. Run mode of the configuration can be changed by editing basic setting of the configuration.