Error using ClearCase as VCS - Cannot get version in snapshot view

I'm trying to setup TeamCity to use ClearCase as the VCS, and I've been having a few problems. TeamCity is complaining that it cannot build the patch for the build.


Here are the details of my setup:
  TeamCity Professional Version 4.5.5 (build 9103)
  TeamCity is using the local SYSTEM account for its Build Agent and Web Server services. I have manually added the local SYSTEM account to have full permissions for the clear case
  data folders.
  TeamCity is attempting to connect to a ClearCase snapshot view:
  D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view
  tag is user_BuildServer_MyProject_FullBuild_view

Settings from the Administration > Edit Build Configuration > Edit VCS Root Page:
  Type of VCS: ClearCase
  ClearCase View Path: D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view
  Relative path within the view: My_vob
  Use ClearCase: BASE
  No Checkout Rules

ClearCase 7.0.1.3-IFIX01
  Running "cleartool catcs -tag  user_BuildServer_MyProject_FullBuild_view" produces this:
  #View files that are checked out.
  element * CHECKEDOUT
  #View files under the \main\MyProject\LATEST branch.
  element \My_vob\... \main\MyProject\LATEST
  #Create the MyProject branch.
  element -file \My_vob\... R5.0.0.0 -mkbranch MyProject
  element -dir * \main\LATEST -mkbranch MyProject
  load \My_vob


When attempting to run a  build, I get the errors listsed below. I've tried clearing the cache and restarting the services, but that has not helped.

[11:45:41]: Updating sources (8s)
[11:45:49]: [Updating sources] Failed to build patch for build #1.0.24-November-2009.11:45:38, build id: 19, VCS root: ClearCase, due to error: Cannot get version in view 'D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view\My_vob' for the directory D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view\My_vob
[11:45:50]: Will repeat attempt when server will be available, number of attempts left: 2
[11:46:00]: Updating sources (7s)
[11:46:07]: [Updating sources] Failed to build patch for build #1.0.24-November-2009.11:45:38, build id: 19, VCS root: ClearCase, due to error: Cannot get version in view 'D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view\My_vob' for the directory D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view\My_vob
[11:46:07]: Will repeat attempt when server will be available, number of attempts left: 1
[11:46:17]: Updating sources (6s)
[11:46:23]: [Updating sources] Failed to build patch for build #1.0.24-November-2009.11:45:38, build id: 19, VCS root: ClearCase, due to error: Cannot get version in view 'D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view\My_vob' for the directory D:\CCdata\snapview\BuildServer_MyProject_FullBuild_view\My_vob
[11:46:23]: [Updating sources] Patch is broken, can be found in file: C:\TeamCity\buildAgent\temp\cache\temp44043patch19
[11:46:23]: [Updating sources] Error while applying patch: Failed to build patch for build #1.0.24-November-2009.11:45:38, build id: 19, VCS root: ClearCase...

Thanks in advance!



Attachment(s):
teamcity-vcs.log.zip
9 comments
Comment actions Permalink

Hello,

Can you please provide me your server logs? (I need "teamcity-vcs.log" and "teamcity-clearcase.log" files)

0
Comment actions Permalink

I have attached the teamcity-vcs.log file. The teamcity-clearcase.log file was not generated. I'll have to look into how to get that one to generate.

Thanks!

0
Comment actions Permalink

I get almost exactly the same problem, only differnce is im running under a specific user context.

Did you manage to find a solution.  TC 4.5.5


Logs attached.



Attachment(s):
logs.zip
0
Comment actions Permalink

Yes, I apologize for not following up on this forum post! I posted the solution at Stackoverflow.com:
http://stackoverflow.com/questions/1787070/setting-up-teamcity-to-work-with-clearcase

This error was caused by my config spec. Changing two lines with the pattern /My_vob/... to * seemed to fix the problem. I don't know why TeamCity had a problem with the more precise pattern, but changing it to * seemed to fix this problem.

Here's the original config spec:

    #View files that are checked out.
    element * CHECKEDOUT

    #View files under the MyProject/LATEST branch.
    element /My_vob/... .../MyProject/LATEST

    #Create the MyProject branch.
    element -file /My_vob/... R5.0.0.0 -mkbranch MyProject
    element -dir * /main/LATEST -mkbranch MyProject


And I just changed two lines (replaced occurrences of /My_vob/... with *)

    #View files that are checked out.
    element * CHECKEDOUT

    #View files under the MyProject/LATEST branch.
    element * .../MyProject/LATEST

    #Create the MyProject branch.
    element -file * R5.0.0.0 -mkbranch MyProject
    element -dir * /main/LATEST -mkbranch MyProject

0
Comment actions Permalink

Well it kind of works I think, although its still getting sources (over 90 minutes)

I hope this is a one time charge, otherwise this will never do.

The other plugin that is mentions on the linke you posted, di you ever try it?

whats the current status?



Nick.

0
Comment actions Permalink

The initial patch generation does take a long time, but subsequent runs will be much faster. If speed is still a problem, I would suggest looking into the plugin that Von C worked on. I never did, but it sounds promising. Von C was extremely helpful, so I'm sure he'd be willing to show you how to get the plugin working.

0
Comment actions Permalink

Hi Andrew,

Are you sure that your snapshot view is updated?

If it's ClearCase UCM environment, you have to make sure that your view is synchronized with its stream.

BR,
Tamir Gefen, GoMidjets
http://www.gomidjets.com

0
Comment actions Permalink

Im using base, CC

It was correctly built but
1) It didnt preserve the structure of my snap (the vob sub directories are not copied across to the build server).
2) As I had to include element * at the bottom, Im getting a whole bunch of files I dont want.
3) as Im getting a whole bunch on elements I dont want, im also getting a whole bunch of update notifications I dont want meaning builds are triggerd unnecesarily.

By this point im really wondering what why I cant just update the view using command line or nant.

So honestly speaking Im not sure CC integration is what I would call usable, at least applications spanning multiple vobs.

0

Please sign in to leave a comment.