设置 TeamCity 以与 ClearCase 配合使用

发布于 2024-08-12 08:54:10 字数 1689 浏览 3 评论 0原文

我正在尝试设置 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 文件:

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 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:

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

半衬遮猫 2024-08-19 08:54:10

正如问题与 Teamcity 和 Clearcase 的持续集成中提到的,我们(一位同事 )确实设法使 TeamCity 与 ClearCase 有效交互,但是:

  • 仅在重写其 ClearCase 插件之后,并且
  • 仅使用动态视图作为查找更改的源(大型快照视图的更新花费了太多时间)

我 动态视图是此类插件的唯一方法,但它们最初的实现效率不高(为每个已更改的文件执行一些cleartool描述

) ClearCase 视图的路径”应指 ClearCase 视图中源的完整路径(请参阅 此线程

错误消息出现在 可能2009,但当时已修复。你使用什么路径?


关于您关于 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:避免假设分支在哪里

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
    )
忆梦 2024-08-19 08:54:10

这个错误是由我的配置规范引起的。将模式 /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/... 的出现)

#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

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
追我者格杀勿论 2024-08-19 08:54:10

安德鲁,我们遇到了与您现在遇到的相同的问题。

Jetbrains 的插件存在致命缺陷,他们做了大量的 ct lsvtree 和 ct 描述来构建缓存,以查找在什么时间创建了哪些版本(对于在 Clearcase 视图下可见的每个元素的每个版本)。
这就是我们编写自己的插件的原因。它使用 Clearcase 配置规范的时间指令,如 VonC 所示:与 Teamcity 持续集成和 Clearcase

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文