lysergic-acid
lysergic-acid

Reputation: 20050

Artifact dependency from the same build configuration in TeamCity

I'd like to setup a TeamCity build that will perform an incremental build.

For this, i want to store the build outputs (.dll files) as artifacts, and reuse them on every subsequent build (copy the latest artifacts to the build agent before starting the build).

This will effectively place the last build's artifacts in the project's output folder, so MSBuild could use those artifacts to determine whether it needs to rebuild anything from sources.

I've tried to do this, but it seems TeamCity doesn't allow configuring artifact dependencies from the same build configuration.

For example, if i have a "Build Plugins" configuration that generates a collection of plugin DLLs, i cannot use these as a dependency for the same build configuration...

Is there any inherent way to overcome this in TeamCity, or to create an easy solution myself?

Upvotes: 4

Views: 2264

Answers (2)

rescdsk
rescdsk

Reputation: 8895

It looks like you can do this now! It seems to work in 9.0.1, and TW-12984 says it should work as far back as 8.1.

Upvotes: 1

caldis
caldis

Reputation: 226

It appears it is only possible to do this when using templates.
You can create a template for a build. Then you create a build from that template. After that you add this build to the artefact dependencies from the template. This allows for circular dependencies.
I have found no other way.

Upvotes: 3

Related Questions