Artifacts Folder

Hello, I have a few Questions about the artifcats folder. Is it possible to:

1. make the artifacts-folder independend from data directory ?

2. change the Artifacts folder to Network Path ?

3. change physical structure of artifacts publishing, e. g. custom string
read from enviroment AFTER build (because it will be generated while build
process) or by custom msbuild task (e. g. GetVersionString) so the Result is:
3.1. TeamCity Data Directory/artifacts// instaed of: 3.2. TeamCity Data Directory/artifacts/// ? The problem here is, I can not acccess properties generated while msbuild-task like %system.build.number% for Naming the artifacts path ->]]> but I can access
these properties in the "Build number format" field of the "general settings
page" of the Web-UI.

Thank you for your help!

--
Gunnar


7 comments
Comment actions Permalink

At the moment it is impossible to change artifacts directory, all you can do is to change location of .BuildServer folder, however I would not suggest you to use network drive since it can impact server stability if network is down.

As for build number you can obtain it from the environment variable too: BUILD_NUMBER

--
Pavel Sher

0
Comment actions Permalink

Hello Pavel,

thank you for your reply. In order to test your suggestion of using "BUILD_NUMBER"
I tryed to use this in the "Artifact paths:"-filed in the following way:
"Release => .\BUILD_NUMBER" and "Release => .\%BUILD_NUMBER%". But in both
cases the folder with my artifacts was just named to "<internal-build-id>\BUILD_NUMBER"
or "<internal-build-id>\%BUILD_NUMBER%".

The BUILD_NUMBER property is set correctly, because I used it for "Build
number format:" in generell settings page and my buildscript is setting the
value while building.

Any suggestions?

At the moment it is impossible to change artifacts directory, all you
can do is to change location of .BuildServer folder, however I would
not suggest you to use network drive since it can impact server
stability if network is down.

As for build number you can obtain it from the environment variable
too: BUILD_NUMBER

--
Pavel Sher



0
Comment actions Permalink

Try this:
Release => .\%env.BUILD_NUMBER%

This one should work too:
Release => .\%system.build.number%

Prefix is required, TeamCity must know exactly from where to take this parameter.

--
Pavel Sher

0
Comment actions Permalink

Hello Pavel,

no - in both cases the artifacts folder is named: "%env.BUILD_NUMBER%" and "%system.build.number%" respectively...

I set the buildnumber via msbuild-script (here it is an hard-coded number) via TeamCity Task: ]]> and in the projects overview there is the correct version number shown after build. as you can see in the attachment. So I wonder why the number is not accessed while using these properties in the artifacts path sa you described before.

Any more suggestions?


Try this:
Release => .\%env.BUILD_NUMBER%
This one should work too:
Release => .\%system.build.number%
Prefix is required, TeamCity must know exactly from where to take this
parameter.

--
Pavel Sher



Attachment(s):
untitled.jpg
0
Comment actions Permalink

Sorry for delay. For some reason I can't check why this setup is not working for you in TeamCity 3.1.x (I suppose you are using 3.1?). But I just checked it in the 4.0 and it works fine.

Anyway if you are changing build number with help of msbuild task you should take another approach. References in build properties and environment variables are resolved BEFORE build is started so changing of build number in a build itself won't affect artifact publishing settings. But there is workaround, you can publish artifacts with help of service message: http://www.jetbrains.net/confluence/display/TCD3/BuildScriptInteractionwithTeamCity#BuildScriptInteractionwithTeamCity-artPublishing

--
Pavel Sher

0
Comment actions Permalink

I too would like to see the artifacts folder be portable to a network drive. We currently store all our build artifacts on a network resource for several reasons, but just mention a few, space and permissions. Instead of chewing up disk space on an already crowded TC Server I'd prefer to be able to tell TC to use a network share as my artifacts folder. Is this possible in TC 4.0? If not, I will add an enhancement request.

In regards to server stability using a network drive. I would expect additional logic within TC to handle this issue gracefully. For example, if the network resource(s) defined are not available, by default write to original TC artifacts directory. In most cases a heavily dependent network resource share someone will notice the issue. However, just in case maybe TC sends and alert email informing the of the network resource issue and indicating the artifacts were save to the TC default location for this BUILD_NUMBER.

Thanks,

Sean

Edited by: Sean Gilbert on Oct 3, 2008 4:47 PM

0
Comment actions Permalink

Hello Pavel,

I am using TC 4.0 EAP version and so I wonder why it still does not work.
I will give your service messages a try and report my results to you.

Thanks

Gunnar

Sorry for delay. For some reason I can't check why this setup is not
working for you in TeamCity 3.1.x (I suppose you are using 3.1?). But
I just checked it in the 4.0 and it works fine.

Anyway if you are changing build number with help of msbuild task you
should take another approach. References in build properties and
environment variables are resolved BEFORE build is started so changing
of build number in a build itself won't affect artifact publishing
settings. But there is workaround, you can publish artifacts with help
of service message:
http://www.jetbrains.net/confluence/display/TCD3/BuildScriptInteract
ionwithTeamCity#BuildScriptInteractionwithTeamCity-artPublishing

--
Pavel Sher



0

Please sign in to leave a comment.