开发者

Setting up TeamCity to work with ClearCase

开发者 https://www.devze.com 2022-12-12 02:36 出处:网络
I\'m trying to setup TeamCity to work with ClearCase for continuous integration, and I\'ve been having a few problems. TeamCity is complaining that it cannot build the patch for the build. I\'ve been

I'm trying to setup TeamCity to work with ClearCase for continuous integration, and I've been having a few problems. TeamCity is complaining that it cannot build the patch for the build. I've been scouring the internet for information on ClearCase and TeamCity, and there is a surprisingly small amount of information on the topic. Has anyone had any success with getting TeamCity to work with ClearCase?

Here's my build log:

[18:09:11]: Updating sources (2s)
[18:09:13]: [Updating sources] Failed to build patch for build #1.0.23-November-2009.18:09:09, build id: 10, VCS root: ClearCase, due to error: Cannot get version in view 'D:\CCdata\my_vob\my_project' for the directory D:\CCdata\my_vob\my_project
[18:09:13]: Will repeat attempt when server will be available, number of attempts left: 2
[18:09:23]: Updating sources (1s)
[18:09:25]: [Updating sources] Failed to build patch for build #1.0.23-November-2009.18:09:09, build id: 10, VCS root: ClearCase, due to error: Cannot get version in view 'D:\CCdata\my_vob\my_project' for the directory 开发者_JAVA技巧D:\CCdata\my_vob\my_project
[18:09:25]: Will repeat attempt when server will be available, number of attempts left: 1
[18:09:35]: Updating sources (2s)
[18:09:37]: [Updating sources] Failed to build patch for build #1.0.23-November-2009.18:09:09, build id: 10, VCS root: ClearCase, due to error: Cannot get version in view 'D:\CCdata\my_vob\my_project' for the directory D:\CCdata\my_vob\my_project
[18:09:37]: [Updating sources] Patch is broken, can be found in file: C:\TeamCity\buildAgent\temp\cache\temp58518patch10
[18:09:37]: [Updating sources] Error while applying patch: Failed to build patch for build #1.0.23-November-2009.18:09:09, build id: 10, VCS root: ClearCase...

Here's the teamcity-vcs.log file:


As mentioned in the question Continuous Integration with Teamcity and Clearcase, we (a colleague and I) did manage to make TeamCity interact efficiently with ClearCase, but:

  • only after rewritten their ClearCase plugin, and
  • only with dynamic views as a source to lookup for changes (the update of a large snapshot view was simply taken too much time)

The dynamic view is the only way to go for this kind of plugin, but their original implementation is not efficient (doing some cleartool describe for every file that has changed!)

The "path to ClearCase view" should refer to a full path to the sources within your ClearCase view (see this thread for instance)

The error message was seen in may 2009, but was fixed at the time. What path are you using?


Regarding your report on JetBrain, your config spec seems weird to me.
I would go with:

  #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

  load /My_vob

(Note:

  • the '/' instead of the '\': both works well with ClearCase, but TeamCity plugin seems to prefer '/'
  • .../MyProject instead of /main/MyProject: avoid to assume where a branch is
    )


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


Andrew, we had the same issue that you're experiencing now.

Jetbrains's plugin is fatally flawed, they do a helluva lot of ct lsvtree and ct describe to build a cache to find what versions were created at what time (for each version of each element visible under the clearcase view). That's why we coded our own plugin. It uses instead the time directive of the clearcase config spec as VonC described here : Continuous Integration with Teamcity and Clearcase

0

精彩评论

暂无评论...
验证码 换一张
取 消