Generate dependent artifacts with old revision

Hello,

Our build artifacts are rather large (total disk space can be 500MB), therefore I delete build artifacts every 10th successful build. We have a release build that generates all our build artifacts and a deploy build that deploys those artifacts. The deploy build depends on the release build for all deployable build artifacts (war files primarily). If I need to deploy a build whose release artifacts have been cleaned I would think that you can simply do a forced rebuild of dependencies from a specific source code revision available in the Artifacts dependencies dropdown. However, the result is that when you rebuild the dependencies, it builds those dependencies using the current revision of source not the selected version of the dependencies. Is this a bug?

Thanks,
-Dave

5 comments
Comment actions Permalink

BTW, my environment is using TeamCity 6.5.1. Is this behavior as expected? Has this problem been fixed in a subsequent release?

-Dave

0
Comment actions Permalink

Hi Dave

Here are two kinds of dependencies are mixed together.
Artifact dependency allows to pass binaries between build configurations - it's used in build-deploy relationship.
But when synchronization of source revisions is required then snapshot dependency should be used.
If you start a history build and select "enforce rebuilding of all dependencies" then all builds in the chain linked by snapshot dependencies will use sources from the same point of time.

Michael

0
Comment actions Permalink

mkuzmin wrote:

Hi Dave

Here are two kinds of dependencies are mixed together.
Artifact dependency allows to pass binaries between build configurations - it's used in build-deploy relationship.
But when synchronization of source revisions is required then snapshot dependency should be used.
If you start a history build and select "enforce rebuilding of all dependencies" then all builds in the chain linked by snapshot dependencies will use sources from the same point of time.

Michael


I have deployed TeamCity 6.5.4 since the original post. After spending most of 2 days, I also figured out a way of doing this inside a script that does all the scm and build work which is called by TeamCity. However, I am still confused by TeamCity's behavior.

If I select a change from a specific point in time in the Changes tab. And if I select the same point in time for each of my artifact dependencies in the Dependencies tab and I select the Rebuild dependencies checkbox, I would expect that the snapshot dependency AND the artifact dependency would be from the same point in time. Instead the artifact dependencies were from the current Head of trunk which is not what I selected at all. What is the expected behavior when you select "Rebuild dependencies" and you select a particular build from Artifacts dependencies?

I have inserted a screenshot of an axample of what I tried below:
TC_dependencies.png

-Dave

0
Comment actions Permalink

Hi Dave

If your configuration are linked by artifact and snapshot dependencies simultaneously, then artifact dependency should have Build from the same chain setting.
Please recheck it.

Build selection in artifact dependency list in not aplicable to this case - your builds are cleaned up and not accessible anymore, so leave this setting as Auto.

0
Comment actions Permalink

mkuzmin wrote:

Hi Dave

If your configuration are linked by artifact and snapshot dependencies simultaneously, then artifact dependency should have Build from the same chain setting.
Please recheck it.

Build selection in artifact dependency list in not aplicable to this case - your builds are cleaned up and not accessible anymore, so leave this setting as Auto.

I think the dependencies are set correctly:
Trunk_dependencies.png
-Dave

0

Please sign in to leave a comment.