Update: This answer only applies to TeamCity v8 or later.
I tried this myself, but unfortunately I suspect that this is not possible.
The Build Dependencies Setup documentation supports the following:
When assembly A depends on assembly B, you can transfer properties from assembly B to build A, that is, properties can only be transferred in the direction of building a chain flow, and not vice versa .
(usually reasonable) reason, I think it looks like the following:
- A dependent assembly configuration may be dependent on more than one assembly configuration.
Think about this: if two parents want to pass their (different) parameters to a dependent assembly, what do they get for the “last successful build”? Theoretically, TeamCity can check whether the properties for the last build are necessary (rebuild otherwise). But even then, you get an ugly build history for assemblers for all different environments. This really does not fit the concept of assembly configurations.
The best way to reuse assembly configurations is to template them, and then create several projects that set properties at the project level so that they are available for all built-in assembly configurations.
Ultimately, a review may be the best advice if you really need to use two build configurations for your project. Best practice is to minimize the number of build configurations and build steps - if possible, add as much build logic to your own scripts.
source share