build agent checkout directory naming

In TC 3.0 it names directories:
c:\TeamCity\buildAgent\work\Server\95a53c374e579e31
It used to be
C:\TeamCity\buildAgent\work\Server\hoth

Is there anyway I can get this old behavior back? This new behavior has caused me a lot of trouble.

1) The ant home location doesn't work any more so I had to move my ant to a static directory not in source control (and no, the %build.working.dir% to specify the ant home path didn't work)

2) I have some builds I run once a day because they take so long but now if I bounce my agent, the state created by these once a day builds is lost because a new directory is created to check source out again.

thanks

6 comments

I think we are going to have to revert back from TC 3.0. This directory naming issue is killing us. I really hope you guys don't stick with this approach or I think we will never be able to upgrade to TC 3.0


thanks
phil

0

Hello Phil,

If default directory naming does not suit you needs, TeamCity allows to specify build working directory manually (see "Build working directory" in Ant runner settings).

Let me explain a bit the approach behind new default names for working directories.

TeamCity 3.0 will allow to specify VCS settings per-build configuration, not per-project as it used to be. This allows to arrange projects and build configurations in a more flexible way.

Considering this new feature the old approach to directories naming cannot be preserved: all build configurations of a project used to share the same working directory, while now each build configuration can have its own set of VCS settings and can require own directory for the build. So we switched to using one build directory for unique VCS settings set.

How it is supposed to work:

A unique name (hash) is generated for a set of VCS settings (set of roots and checkout rules) used in a build configuration. The name is used as build working directory name. This means that all build configurations with the same VCS settings share the same directory.
The actual directory can be seen in the build log and in the read-only directory.map file situated in the agent's work directory.

Back to the issues you noted:

1) The ant home location doesn't work any more so I had to move my ant to a static directory not in source control
(and no, the %build.working.dir% to specify the ant home path didn't work)


So far this does not seem to be related to the new directories naming. I just checked setting Ant home through %build.working.dir% and it worked in my environment. Can you please create a Jira issue and describe the problem in a bit more detail?

2) I have some builds I run once a day because they take so long but now if I bounce my agent,
the state created by these once a day builds is lost because a new directory is created to check source out again.


I am sorry for the inconvenience. But this should not repeat after the upgrade unless you change VCS settings of the build configuration. Did you consider publishing results of the build as build artifacts?

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

thanks for the comments. I think there is a bug though, it is creating new directories constantly and I am not changing my VCS (perforce) settings. I think it is creating new directories when the agent is bounced (I have 5-6 directories on each agent). It is was a consistent then the behavior as you describe it would be ok because everything would always be going to the same dir, which means there would be no need to check out and build the entire project every time.

I don't think artifacts will work, it's the same problem the build expects items to be in a certain location and they would be in a completely different directory structure. Or am I missing something?

thanks for your reply
phil

0

Phil,

Could you please create a Jira ( http://www.jetbrains.net/jira/browse/TW ) issue and describe when new directories are created on agents? I am not sure I understand what you mean by "bounced" agents. Please describe this too.

By using artifacts I meant publishing results of your once a day builds as build artifacts so they are not lost. If artifacts can help in your case, they can be configured to be picked up from any directory (e.g. %build.working.dir% can be used).

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

I've got the same sort of problem. We have a project that holds the various jars needed by other projects to build, this could be log4j, junit, Oracle jars, our component jars, etc depending on the project. I need to put them in a stable place that I can make available to projects as needed. There is way too much to publish as artifacts, especially given the weak UI for this in TC.

0

Richard,

If you need specific directory for a build to run in, you can specify "Build working directory" (more on the option in TeamCity online documentation: http://tinyurl.com/yp8hrg ) This will instruct TeamCity to checkout sources into the specified directory (but in this case you need to ensure the directory is not used by several build configurations with different VCS settings).

Hope, this helps.

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.