English 中文(简体)
Setting up TeamCity to work with ClearCase
原标题:

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:CCdatamy_vobmy_project  for the directory D:CCdatamy_vobmy_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:CCdatamy_vobmy_project  for the directory D:CCdatamy_vobmy_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:CCdatamy_vobmy_project  for the directory D:CCdatamy_vobmy_project
[18:09:37]: [Updating sources] Patch is broken, can be found in file: C:TeamCityuildAgent	empcache	emp58518patch10
[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:

最佳回答

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
问题回答

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
    )

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





相关问题
Teamcity and clearcase project spanning multiple vobs

I have a clearcase project spanning multiple vobs. Teamcity 5.0 appears to assume your project is on a single clearcase vob. Is it possible to have Teamcity build a clearcase project spanning ...

Clearcase UCM - Working with streams and components, how?

My co-workers and I are relatively need to the stream idea with Clearcase UCM. Currently management has created streams for each functional software package, each of which has defined interfaces and ...

Setting up TeamCity to work with ClearCase

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

how to change views with clearcase on eclipse

I m using eclipse to work on a HUGE C project and it works generally well except for not being able to change views. I create a new project and set the project source to the clearcase vob directory ...

ClearCase UCM - best practices using components

We are migrating a fairly large codebase from VSS to Clearcase w UCM and are considering organizing our source into one or more components within a single project. What best practicespotential ...

Continuous Integration with Teamcity and Clearcase

Has anybody successfully integrated Clearcase with Teamcity (which advertises Clearcase support) to realize a productive continuous integration build environment on a decent size project?

热门标签