Rational ClearCase Configuration
Typical / Minimal Configuration
For most uses the following is all you'll need in your ccnet.config :
<sourcecontrol type="clearCase">
<viewPath>C:\PATH\TO\SOURCE</viewPath>
<autoGetSource>true</autoGetSource>
</sourcecontrol>
This will:
- monitor ClearCase for any changes on the viewPath or below
- retrieve the lastest source from ClearCase when any changes are detected
- apply a label to the built files at the end of the build
The <viewPath> specifies a directory on your filesystem that CCNet monitors for changes. The path must be a versioned object. CCNet checks the actual VOB for changes, not the local filesystem.
<viewPath> doesn't have to be the root of the local ClearCase view. It may be any of the root's children or even a single object.
Full Configuration
<sourcecontrol type="clearCase">
<viewPath>C:\PATH\TO\SOURCE</viewPath>
<branch>main</branch>
<autoGetSource>false</autoGetSource>
<useLabel>true</useLabel>
<useBaseline>false</useBaseline>
<projectVobName>PROJECT_VOB_NAME</projectVobName>
<viewName>PROJECT_VIEW_NAME</viewName>
<executable>cleartool.exe</executable>
<timeout>50000</timeout>
</sourcecontrol>
| Element |
Description |
Type |
Required |
Default |
| viewPath |
The path that CCNet will check for modifications and use to apply the label. See above for full details. |
string |
yes |
none |
| branch |
The name of the branch that CCNet will monitor for modifications. Note that the config spec of the view being built from must also be set up to reference this branch. |
string |
no |
none |
| autoGetSource |
Specifies whether the current version of the source should be retrieved from ClearCase |
bool |
no |
true |
| useLabel |
Specifies whether a label should be applied when the build is successful. |
bool |
no |
true |
| useBaseline |
Specifies whether a baseline should be applied when the build is successful. Requires the VOB your view references to be a UCM VOB. Requires that you specify <viewName> and <projectVobName>. |
bool |
no |
false |
| executable |
Specifies the path to the ClearCase command line tool. You should only have to include this element if the tool isn't in your path. By default, the ClearCase client installation puts cleartool in your path. |
string |
no |
cleartool.exe |
| projectVobName |
The name of the project VOB that the view path uses. |
string |
if <useBaseline> is true |
none |
| viewName |
The name of the view that you're using. |
string |
if <useBaseline> is true |
none |
| timeout |
Sets the timeout period for the source control operation. See Timeout Configuration for details. |
Timeout |
10 minutes |
false |
Common Problems
The build is initiated when users check in on private branches
By default, ClearCase returns a history for every file in every branch, even if the config spec limits to a single branch. You must specify <branch> in order to limit which changes CCNet can see.
After the build is successful I get a "Baseline not found" error message.
An example of this message is:
This happens when <projectVobName> is not set to the project VOB. Typically this happens when the user specifies the UCM VOB instead of the project VOB.
To correct the problem, change the value in that element to the name of the project VOB.
Known Bugs
When I view my baselines, I see that they're called CruiseControl.NET[something] instead of v1.0.0.4.
This is a bug in ClearCase; Rational is aware of it. It only occurs if you're using baselines.
CCNet creates a temporary baseline with the prefix CruiseControl.NET before renaming it to the final value, such as v1.5.2.3. Depending on how you view baselines in ClearCase, you may see the temporary or real name.
For example, if you use the admin console, you'll see the old, temporary value. If use use cleartool lsbl, you'll see the correct one:
CruiseControl.NET sees checkins on all branches, not just the one specified in my config spec
This is due to the fact that the ClearCase history command (lshist) returns a complete history for the file, not just the history that can be seen by the config spec.
The workaround is to make sure you include a <branch> element in your configuration. This will force ccnet to just see changes on that branch.
CruiseControl.NET doesn't see my changes
Make sure the clock of your build server is synchronised to the clock of your ClearCase server. See CCNET-271.