Dependency on a Dependency

So, say I have 3 projects, call them A, B, and C. They have dependencies as such:
Project B depends on Project A
Project C depends on Project B AND Project A

When I configure Project B, the build pulls in the dependencies I need from project A without a problem. Now, though, is there a way to get Project C to pull in not only the artifacts from Project B but also the artifacts from Project A that were used when building Project B?

Thanks!
Ray

7 comments
Comment actions Permalink

I would say you need to configure dependencies by sources between these projects (this feature is available in the latest EAP). In this case if you will configure C and B to get artifacts from the last finished A then if dependencies by sources present these builds will get consistent artifacts from the same build.

--
Pavel Sher

0
Comment actions Permalink

This method will not work for us. Because of when B and C could be run (possibly weeks apart), the last successful/pinned/whatever build of A will not necessarily be the same. I know that TC somehow knows which dependencies were used by a build (a build of project B has a dependencies tab with a link to the build from project A that it used). What I think is need here is an option to do a sort of deep-resolve of dependencies. Is there any other way to achieve this?

0
Comment actions Permalink

Ray,

There is no such ability now.

As a workaround you can retrieve the necessary artifacts from A in B and then later reuse them in C.

I can also think of a plugin that will push the build number of A as a property into build C so that the build can retrieve the artifacts in the build script.

Can you please describe your use case in a bit more details (what A, B and C build configuraitons are doing) so that we understand it and can consider when implementing further features?

--
Best regards,

Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Hi Yegor,

I probably should have explained it this way in the first place:

We have a product that consists of three components, two are software (lets call them core and extension) and one is data. The extension component is dependent on core and the data component is dependent on extension. When we release this product, we use the latest build of the core and extension and the data component that was built with this combination. TeamCity handles everything fine up to this point. However, we also have a case where for a given product we may do one or more "data refreshes". In these cases, we want to use the shipping version of the software to build a new (updated) data component. To do this properly, we require the artifacts from both the core and extension shipping builds as well as the latest source from our repository (in order to get updated properties and configuration files). This is where this requirement stems from.

Additionally, I think it would be extremely beneficial to have a way to associate the VCS tag that was applied to a set of sources during a build with the build information (when this is possible) to enable using the VCS tag to configure dependencies. (I just noticed that it doesn't seem that this is possible).

Thanks for your help on this.
ray

0
Comment actions Permalink

Ray,

Thank you for the details of your setup.

We will consider you case in our future development.

BTW, if you can manually lookup the build numbers of the necessary core and extension builds, you can trigger the data build via custom run dialog specifying the build numbers there. The data will need to use the numbers in the artifact dependencies configuration, then.

This approach is only available in the 4.0 version EAP.

As to using the VCS tag, I am not sure I understand how is it supposed to be used in dependencies.

0
Comment actions Permalink

My thought with the tagged build would be an option in the dependencies to choose a configuration and have an option like "Get Artifacts From: Tagged Build" and a place to set what the build was tagged like "MyProduct v1.0 Shipping Release". Although, the more I think of this, the less sense it starts to make, even for myself. I suppose, if you know the tag, you know the build number and you should be all set.

Oh well. I guess sometimes you just need to think a bit out loud. :)

thanks again, ray

0
Comment actions Permalink

Ray,

BTW, we have a feature filed to artifact-depend on the last build with a given build tag applied.

0

Please sign in to leave a comment.