Obtaining artifacts from the previous build

We would like a build to obtain artifacts from the previous successful build as inputs. This is for regression testing, so that we can analyse and report on the differences from the previous build.

When I try this in "5 Dependencies", Add new artifact dependency, the "Depend on" dropdown does not list the current build as an option.

Is this something that TeamCity just does not support and if not, are there any suggested workarounds other than dumping the build results in a file on some known network location?


The option you want is in the Get Artifacts From drop down. In there, you can choose the last successful build, etc.


The "Get artifacts from" drop down pertains to the builds in the drop down above it (called "Depend on"). The problem is that the current build type is not in the list, implying that artifacts cannot be taken from a previous build of the same build type.


I would suggest separating out the "regression" testing as a separate build type.  With TeamCity's ability to parallelize things across different agents, it's to your advantage to break up a large monolithic build.

We currently have a build that takes 5+ hours (build & test) in CruiseControl.  We're moving it to TeamCity and will break it up to something like:

- Installer
- UI Tests
- System Tests
- Core Tests,
- Eclipse Tests
- Project Tests.

So the build will generate artifacts consumed by the other build types.  This takes 5-10 minutes to run.  The Testing will run separately and in parallel on different agents.


Bill, we have broken the build up as you suggest. The regression tests are just one of many 'build types' which we have split into many different types of tests. Breaking the build into many different build types doesn't solve the problem of the regression tests getting the results of a previous run of the regression tests though.


Hello William,

Sorry for the delay in replying. TeamCity allows to obtain archive from the build script using one of the URL patterns (please see http://confluence.jetbrains.net/display/TCD5/Patterns+For+Accessing+Build+Artifacts#PatternsForAccessingBuildArtifacts-ObtainingArtifactsfromaBuildScript) or using Ivy dependency manager (please also see http://confluence.jetbrains.net/display/TCD5/Configuring+Dependencies#ConfiguringDependencies-UsingAntBuildScript).

As for ability to have artifact dependency from the same build configuration please watch/vote for http://youtrack.jetbrains.net/issue/TW-12984.

Kind regards,


Please sign in to leave a comment.