Base ClearCase usage case?

Hello everyone,

I'm trying to integrate TeamCity with our existing ClearCase setup, and I don't think I understand how it's meant to be used.

I thought it would be like:

  1. Provide user/pass to TeamCity to our ClearCase server
  2. Make an empty view with TeamCity
  3. Specify configspec in that view
  4. Specify the build file you want to run


But TeamCity doesn't seem to work that way at all.
So far, I've done:

  1. Make a view myself with the configspec I want for a specific project
  2. Point TeamCity to that view by creating a VCS root
  3. Specify the build file you want to run



So here are the things I don't understand.

  1. When the build file is running on #3, TeamCity makes a copy of that view into a BuildAgent directory, and runs the build file from there. Why not just use the view that I made on #1, rather than making a copy of the whole view?
  2. Why does it require that I point a VCS root to a directory underneath the actual VCS root? Why not just point directly to a root where the "view.dat" resides?
  3. If there are multiple VCS roots for a configuration, I need to add checkout rules for each of them, ie. "..=>./viewroot1", "..=>./viewroot2", etc.. Why require this, when it seems like this should be a default behaviour?



I'm working with about 20 programs with 3 versions each. Also, each project requires at least three view roots(tools, common_src, program_src, etc.)
Using the provided model, it seems like I need to create 60 snapshot views with respective configspecs, and specify 3 VCS roots and corresponding checkout rule("..=>./tools", "..=>./common_src", etc.) for each of the 60 views.

At this point, I'm thinking that that can't be right.
I can even understand it if I have to make 60 views, but the second part just doesn't make sense because that information is specified in configspec.


Having said that, can someone help me understanding the usage model of this plugin?
TeamCity is a great program, and I'm betting that I'm just completely mistaken on how it's meant to be used.

Thank you

7 comments
Comment actions Permalink

I researched the ClearCase integration more closely, and it boils down to this question:

- Is there a way to map a configspec to a VCS root?


Each of our products reach across multiple VOBs, picking out the elements via labels and directories.
As far as I can tell, I'm forced to make a VCS root for each VOB, and use checkout rules to pick out the elements.

All that information is already specified in a configspec, and not being able to directly apply a configspec to a VCS root is a huge recurring overhead.

Any TC+CC experts out there with advices?

Thank you

0
Comment actions Permalink

Calvin,

1. When the build file is running on #3, TeamCity makes a copy of that view into a BuildAgent directory, and runs the build file from there. Why not just use the view that I made on #1, rather than making a copy of the whole view?

TeamCity can also run history builds that are built not on the actual sources in the view.

2. Why does it require that I point a VCS root to a directory underneath the actual VCS root? Why not just point directly to a root where the "view.dat" resides?

"View path" setting in TeamCity is not a path to ClearCase view. It is the path to your project sources root.

3. If there are multiple VCS roots for a configuration, I need to add checkout rules for each of them, ie. "..=>./viewroot1", "..=>./viewroot2", etc.. Why require this, when it seems like this should be a default behaviour?

What are the "view path" settings in these VCS roots? I think that it can be made easier.

Is there a way to map a configspec to a VCS root?

Config spec of the VCS root is the config spec of the corresponding ClearCase view.

0
Comment actions Permalink

Hi Maxim,

"View path" setting in TeamCity is not a path to ClearCase view. It is the path to your project sources root.

I'm really confused by this response. By "project sources root", do you mean a VOB root?
Can you give me some examples of a valid "View path"s?
I can't think of a way to point to a source file without making a view first.

Also, most of our projects pull files from multiple VOBs. Does that mean I need multiple VCS root for each projects?


Config spec of the VCS root is the config spec of the corresponding ClearCase view.

Can you show me where to specify the config spec for a VCS root?
My ClearCase config specs are single flat text files, but I don't see anywhere on TeamCity where I can just copy/paste the content of the config spec.
The closest thing to it that I found was "edit checkout rules", which requires me to decode the flat text file config spec into pieces.



Thank you for your time,
Calvin

0
Comment actions Permalink

Hi Calvin,

I'm really confused by this response. By "project sources root", do you mean a VOB root?
Can you give me some examples of a valid "View path"s?
I can't think of a way to point to a source file without making a view first.


No, it is not a VOB root. For example you have a view "myView" in ClearCase that loads a VOB "myVOB". The path to your ClearCase view is "C:\clearcase\myView". This VOB contains folder "myProject" with your project sources. In this case your TeamCity "view path" must be "C:\clearcase\myView\myVOB\myProject".

Also, most of our projects pull files from multiple VOBs. Does that mean I need multiple VCS root for each projects?

Yes.

Can you show me where to specify the config spec for a VCS root?
My ClearCase config specs are single flat text files, but I don't see anywhere on TeamCity where I can just copy/paste the content of the config spec.
The closest thing to it that I found was "edit checkout rules", which requires me to decode the flat text file config spec into pieces.

You don't have to specify the config spec anywhere in TeamCity. TeamCity gets it directly from ClearCase using the view which name is extracted from "view path" setting ("C:\clearcase\myView" in the example above).

0
Comment actions Permalink

Happy new year!

Thanks for your explanations. Let me get back to my original questions(slightly modified):


I'm working with 20 programs with 3 versions each. That makes it 60 different build configurations.


 

That means I need to make 1. 60 views on 2. TeamCity Master Server, correct?

1. One might argue that I can make a "master view" that contains everything, make VCS roots for each VOBs in the "master view", then share those VCS roots across the 60 views.
However, creating this "master view" is impossible because different projects need to access different versions of a same file; there isn't a way to create a single view that exposes multiple versions of each files. Therefore, I'm forced to make a view for each build configurations.

2. Also, these must be on Master Server, not Build Agents, because "updating on agent" isn't supported for ClearCase.


Also, each project pulls files from at least three VOBs.


 

And that means that I need to create 3 VCS roots for each of the 60 views, totalling 180 VCS roots?


Thank you,
Calvin

0
Comment actions Permalink
However, creating this "master view" is impossible because different projects need to access different versions of a same file; there isn't a way to create a single view that exposes multiple versions of each files. Therefore, I'm forced to make a view for each build configurations.

Let me explain this point a little further.

On SVN, a project may like this---------------
     http://svnrepository
      |-- Project1
      |     |-- branches
      |     |     |-- Version1
      |     |     |     |-- dir1
      |     |     |          |-- file1
      |     |     |-- Version2
      |     |           |-- dir1
      |     |                |-- file1
      |     |-- trunk
      |           |-- dir1
      |                 |-- file1
      |-- Project2
            |-- branches
            |-- trunk
--------------------------------------------------------------

If you make a VCS root to http://svnrepository/ and load Project1, you will end up with a single VCS root that contains multiple versions of file1, aka "master view". This VCS root can be shared amonst all the different versions(build configurations) of Project1. If I have 20 products with 3 versions each, I only need 20 VCS roots, not 60.

However, in my understanding, ClearCase doesn't work this way. As far as I know, it is not possible to create a single view that contains multiple versions of a file. Because of this limitation, I must make 60 VCS roots for 20 products x 3 versions each.

Hope this helps you understand my difficulties.
Thanks

0
Comment actions Permalink

Was anything ever done about this or did you just give up.

Similarly I have 5 Vobs with 10 of 20 projects in each.

I have to make between 50 and 100 vcs roots in TC

Tell me this isnt so!


I have a single CC config spec which build my snapshot.
resulting in a single view.dat file file.

Surely thats all TC needs to know...

0

Please sign in to leave a comment.