Clearcase dynamic view with TeamCity

I am trying setup teamcity for the first time in our build environment. We use Clearcase as a VCS.
Our build process and scripting around is closely tied with dynamic view. So, there is no chance of using snapshot view.
So, my question is, can we use dynamic view in TeamCity. If so, can some on share the steps for configuring the same. Documentation is not very clear to me.
Server side & agent side checkouts, VCS root are quite confusing. May be it's already discussed in this forum. But, as i didn't get the relevent information in any of the posts/blogs/technote/help page, posting this question.
Your help/guidance is highly appreciable.

PS: We are using Windows OS and SQL as a database. I am able to install & configure teamcity with SQL database and with LDAP authentication. Now, I am trying to configure VCS in creating a teamcity job/project.
     I am using Teamcity 9.0.


Comment actions Permalink

Hi Vinay,

Both dynamic and snapshot views are supported in TeamCity, while snapshot view is recommended.
You need to create a ClearCase snapshot or dynamic view on the TeamCity server machine (regardless of whether you plan to use the server-side or agent-side checkout). This should be a separate view used only by TeamCity, developers should not use this view at the same time. This can lead to conflicts. There is no difference for TeamCity between snapshot and dynamic view, the recommended one is snapshot. Dynamic view is not so stable, for example we have the related issue
Can you please describe why do you need to use dynamic view in TeamCity?

Comment actions Permalink

Hi Alina,
Thanks for the reply.

First, I will answer your question, "Can you please describe why do you need to use dynamic view in TeamCity?"
We can only use dynamic view, as all our build scripts works only with dynamic views. We use omake as a build tool and it provides winkin feature, that is supported only when we use dynamic view.

You also mentioned like, "You need to create a ClearCase snapshot or dynamic view on the TeamCity server machine (regardless of whether you plan to use the server-side or agent-side checkout)".
But, our build enviroment doesn't allow a view to be accessed which is hosted/created in a different host. So, if I create a dynamic view in TeamCity server and if I try to access it from the agent machine, our build may not work.

I am still not clear, how dynamic view works in team city. i.e. what it does in background. Could you please explain me in brief, what happens each time we trigger a build when using dynamic view (considering both server side checkout and agent side checkout scenario).
Thanks in advance.

Comment actions Permalink

Hi Vinay,

TeamCity uses ClearCase view on the server machine to check for the changes and build the patch in case of the server-side checkout. This view is not used during the build process anyhow because the build runs on the TeamCity agent and not on the TeamCity server, so it actually does not matter whether this view is snapshot or dynamic, that is why snapshot view is recommended here as more simple and stable.

If you use server-side checkout TeamCity does not create any ClearCase view on the agent. That is how it works: TeamCity server knows the version of the sources on the agent, checks out the needed version on its side, builds the patch from the agent's version to the current version, sends this patch to the agent and agent just applies the patch without any knowledge about where it actually came from (from which VCS), so there is no need in any ClearCase view on the agent in this case.

If you use agent-side checkout then agent performs checkout by itself. To do it agent creates a local ClearCase view using the config spec of the TeamCity server view but the agent view is unfortunately always snapshot (even if the server view is dynamic).

One more way that you could try is manual checkout (The "Do not checkout files automatically" option in the build configuration VCS settings). This option means that you still need to create a server view to perform checking for changes, but TeamCity will not perform checkout at all leaving this task to your build script.

Please also see the documentation:

Feel free to ask further questions if you have any.


Please sign in to leave a comment.