设置TeamCity以使用ClearCase

时间:2009-11-24 00:33:36

标签: continuous-integration teamcity clearcase

我正在尝试将TeamCity设置为使用ClearCase进行持续集成,而且我遇到了一些问题。 TeamCity抱怨它无法为构建构建补丁。我一直在互联网上搜索有关ClearCase和TeamCity的信息,并且关于该主题的信息量非常少。让TeamCity与ClearCase合作是否有任何成功?

这是我的构建日志:

[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 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...

这是teamcity-vcs.log文件:

3 个答案:

答案 0 :(得分:3)

如问题Continuous Integration with Teamcity and Clearcase中所述,我们(同事和我)确实设法使TeamCity与ClearCase高效互动,但是:

  • 只有在重写了他们的ClearCase插件后才能使用
  • 仅将动态视图作为查找更改的源(更新大型快照视图的时间过长)

动态视图是获得此类插件的唯一方法,但是它们的原始实现效率不高(为每个文件做了一些cleartool describe!)

“ClearCase视图的路径”应该引用ClearCase视图中源的完整路径(例如,参见this thread

错误消息在may 2009中看到,但当时已修复。你用的是什么路径?


关于your report on JetBrain,您的配置规范对我来说似乎很奇怪 我会选择:

  #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

(注意:

  • /”代替“\”:两者都适用于ClearCase,但TeamCity插件似乎更喜欢“/
  • .../MyProject而不是/main/MyProject:避免假设分支在哪里 )

答案 1 :(得分:2)

此错误是由我的配置规范引起的。使用模式/ My_vob / ...更改两行到*似乎可以解决问题。我不知道为什么TeamCity对更精确的模式有问题,但将其更改为*似乎可以解决这个问题。

这是原始的配置规范:

#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

我刚刚更改了两行(替换了/ 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

答案 2 :(得分:1)

安德鲁,我们遇到了你现在遇到的同样问题。

Jetbrains的插件存在致命缺陷,他们做了大量的ct lsvtree和ct describe来构建一个缓存来查找在什么时间创建的版本(对于clearcase视图下可见的每个元素的每个版本)。 这就是为什么我们编写自己的插件。它使用clearcase配置规范的time指令作为VonC,如下所述:Continuous Integration with Teamcity and Clearcase