How to setup artifact dependencies?

Hi,
I am getting nuts trying to set up my CI environment.
I tried to goggle my way out but unfortunately without any luck so I hope someone here can help me
*****************

I am using: perforce (p4) source server, Solution 2008, TeamCity  4.01
*****************

I have folders organized something like this:

  • Checkout folder
    • ProjectA
    • ProjectB
    • Lib
      • projectA.debug
      • projectB.debug


ProjectB references ProjectA but because ProjectA is rarely changed, ProjectB solution file does not contain ProjectA. (Only the reference to ProjectA.dll is used in ProjectB)
*****************

In TeamCity, I have 2 projects (each one with one build configuration).

Project 1 (ProjectA build project) has next value of Artifact paths:

lib\vuscode\projectA.debug\ => dist

ProjectA\ => projectA.src

Project1 has successfull build which result with:

- %system.teamcity.build.checkoutDir%\lib\projectA.debug containing the built DLLs

- team city data directory containing projectA.src and dist
*****************

Project 2 (Project B build project) needs ProjectA.dll file in order to complete the build. ProjectA.dll file is referenced from lib\projectA.debug folder.

After reading the documentation I tried next Artifact Dependencies definition:

Depend on:                  ProjectA-Project1
Get artifacts from:      Last successful build
Artifacts path:              lib\projecta.debug\*.dll (relative to project1 work folder)
Destination path:       lib\projecta.debug\*.dll (relative to project2 work folder)

The intent I had with this is to copy dll from “project1\lib\projecta.debug” work folder tree to project2 “project1\lib\projecta.debug” work folder
*****************

The only result I got was

Failed to download artifact dependency <Project1 :: Project1BuildConfig (last successful build)>: No files matched for pattern "projects/lib/ProjectA.debug/*.dll" from < Project1 :: Project1BuildConfig (last successful build)>

I’ve double checked that Project1 d:\Build\TeamCity\buildAgent\work\ work subfolder contains all of the dlls
*****************

I am sure I am doing something very wrong (and probably very stupid) but I do not know what.

Please help

Nikola Malovic

1 comment
Comment actions Permalink

You should publish your dll file to the TeamCity first.

Your build which produces dll file can run on any agent and it is not that easy to take artifact from the agent itself that is why all artifacts must be published to the TeamCity server. So in the build configuration which creates dll file you need to specify path to its artifacts on the general settings page. After the build of this configuration finishes artifacts will be published to TeamCity server. Then when build depending on dll file starts it will take artifacts from the server.

--
Pavel Sher

0

Please sign in to leave a comment.