1
votes

I have a number of builds that creates a package that is published to a package manager (for example NPM, Nuget and Maven).

I have subsequent builds that trigger on the completion of this build, they get the artifact from this repository. The problem is they show a warning:

warning

I'm considering adding a Snapshot dependency, however, Teamcity's UI describes snapshot dependencies as builds using the same sources:

snapshot dependencies

There is no source dependency between these projects and in fact, they may have completely different VCS roots.

What is the appropriate way to link these projects? Reading the documentation on Snapshot Dependencies, it sounds like things might not work as expected if I add a dependency without shared sources.

1
How did you configure the artifact dependency? The "Get artifacts from" setting, what is this set to?Lasse V. Karlsen
There is no direct artifact either; its passed via a separate repository.Dave Hillier
Are you sure about that? TeamCity shouldn't warn about missing snapshot dependencies if you have set no dependency at all between two builds.Lasse V. Karlsen
Yes, I just checked now.Dave Hillier

1 Answers

1
votes

There is no requirement to link these projects, other than by the trigger you already have I don't think.

If the triggered build always gets the latest version from the package manager, then you'll get the behaviour that you want.

Snapshot dependency simply ensures that a build which depends on another build gets the same version of the source code when it builds, and doesn't end up being built using some changes that someone else checked in between the first build starting and the second build starting. This doesn't look like its going to be an issue in your situation (and indeed the builds may use completely different repositories), so I think your finished build trigger is an appropriate solution.