Understanding artifacts with multiple buildagents

Hello!

Background:
I am very new to TeamCity and is trying to setup the build server for the first time.
I have installed TeamCity-8.1.4 on one server and 2 buildagents on two others (all three virtual).
One of the buildagents runs on MacOSX to be able to build xcode projects.

Context:
In the documentation for TeamCity it is mentioned that artifacts can be shared between buildagents using NFS.
I have also read that it is preferred that building is done in the same way as if that was done manually.
This could be the filestructure of my setup (I can change everything in the structure to make this work):


/coding

 
├──
Artifacts

|

  ├─
LibA-1.0.jar
|  
├─
LibA-2.0.jar

|  
├─
LibB-1.0.jar            (Dependency: LibA-2.0.jar)

|  
├─
App1-1.0.jar            (Dependency: LibB-1.0.jar,3rdPartyLib-1.0.jar)

|  \
3rdPartyLib-1.0.jar

\─
Projects

   
├─
App1

   |
  \

1.0
   |
     ├
src (All sourcecode)

   |     
\
build

   |        
├─
libs
(The dependant libs are copied here without the version numbers before compiling)

   |        
├─
... (All the builded files)

   |        
\
dist (Final artifacts ends here and are later copied to /artifacts)

   
├─
LibA

   |  
├─
src

   |  
\─
build

   
\
LibB

      
├─
src

      
\─
build


So when this builds this will be the order: LibA-2.0.jar, LibB-1.0.jar, App1-1.0.jar
I understand that the way to get 3rdParty lib is to check them into source control and add another VCS root to the build configuration.

The question:
How would the the buildagents share the artifacts using NFS? Will they just share the 'work' directory? In this case shouldn't I prevent the sending/receiving any artifacts to/from the TeamCity server?
Without NFS and if you were Microsoft using TeamCity to build fx Windows, would a buildagent then need to download MANY dll files if I should compile 'Calculator'. It sounds like alot of times is used to move files around if NFS is not used?

I am sorry for the length of this post but couldn't explain it without.
Any help or links to articles explaining this (with examples maybe) is very appriciated

Best regards,
- Morten Green Hermansen, Fanitas
2 comments
Comment actions Permalink

Hi Morten,

Build agents publish artifacts to TeamCity server where they are stored in the .BuildServer/system/artifacts directory. The structure of stored artifacts is the following: ProjectName/subProjectName/BuildConfigurationName/buildId/artifactPath. This directory can be shared by network.

So to re-use the results of one build in another you should:

This will allow TeamCity to ensure that artifacts arrive at correct agent at correct moment of time. Also TeamCity will track usages of such artifacts.

These two blog posts can be useful: Improving performance and scalability of your TeamCity server, Improve Build Times with Compressed Artifacts.

Two related plugins: https://confluence.jetbrains.com/display/TW/Deployer+plugin, https://github.com/EKibort/TeamCityNetPublisherPlugin.

If you need some special directory structure for your artifacts you can write a plugin for the server which will listen for build finished event and republish artifacts to some other place: https://confluence.jetbrains.com/display/TCD8/Extending+TeamCity

0
Comment actions Permalink

Hello!

Thank you for your reply! I have now the dependencies working but still not the NFS stuff running - still working on that.
Thank you, Alina!
Still looking for a exact NFS implementation example. If I am not successfull I will post one if I get it working.

Best regards,
- Morten Green Hermansen, Fanitas

0

Please sign in to leave a comment.