Reputation: 573
We've just expanded our TeamCity footprint so that we now have multiple agents running on separate servers (they all used to be on the same server).
The issue we are running into is during a build that has multiple steps, where the last step depends on the artifacts that have been created by a previous step. It seems that the same agent is not used for all of the build steps. Therefore when Build Agent 1 creates an artifact in C:\BuildAgent\work\785e028597a0a18d\src\\obj\octopacked, the last step cant seem to find it because the last step seems to run on the other agent, Build agent 2, which of course doesnt have that artifact on that server.
Do I just need to use a UNC path for the artifacts instead, or am I missing something here? I thought that one build configuration would always use the same Build Agent, but it seems that is not the case.
Any help would be greatly appreciated.
Regards,
dotdev
Upvotes: 4
Views: 1799
Reputation: 3704
If you are publishing the build artifacts correctly then different agents will be able to resolve them correctly. My hunch is they aren't being published or maybe they aren't being consumed correctly either.
1. Ensure you are publishing your artifacts using the following field, but as I can see you're using Octopack then this should be published automatically. It might also be worth checking that the flag /p:OctoPackPublishPackagesToTeamCity=false
isn't being passed as a build parameter in the compilation step
2. In the dependent build configuration, ensure you are consuming the artifact correctly
This will ensure that the .nupkg
is available in the working directory of the agent that starts this build configuration. If it's not there then look at the step producing the artifact to ensure it's being published.
Hope this helps
Upvotes: 2