I really can't get my head around the concept of snapshot dependencies in teamcity (7.1).
We have a build project which deploys the database accordingly to a build parameter (database name and file) and i have a build project which builds and deploys our web app.
What I would like to do now is to chain these two builds but override the build parameter. I found the manual how to access depency build parameters (%dep.btXX.yyy%) but i don't want to access them, i want to override them!
How can I achieve this? I've created a new build in which i trigger the build & deploy and then the database build but it completly ignores my dependency parameters and also I can't change the order of the builds.
Thanks for help!
A snapshot dependency alters the builds' behavior in the following way: when a build is queued, so are the builds from all the build configurations it snapshot-depends on, transitively; TeamCity then determines the revisions to be used by the builds ("checking for changes" process).
By setting a snapshot dependency of a build (for example, build B) on another build's (build A) sources, you can ensure that build B will start only after build A is run and finished. We call build A a dependency build, whereas build B is a dependent build.
A build chain is a sequence of builds interconnected by snapshot dependencies. Sometimes the build chain is called a "pipeline". Parts of a build chain linked with snapshot dependencies with enabled revisions synchronization use the same snapshot of the sources.
According to the documentation, it's now possible in Teamcity 9:
Overriding Dependencies Properties
Since TeamCity 9.0, there is a possibility to override the dependencies parameters by redefining them in the dependent build. For example, build configuration A depends on B and B depends on C; A has the ability to change parameters in any of its dependencies using the following format: reverse.dep..
It is also possible to change parameter in all dependencies at once: reverse.dep.*.
The dependencies properties to be overridden can be specified in the parameter names of the dependent build A, either in the custom build dialog or via build configuration parameters.
Pushing a new parameter into the build will supersede the "Do not run new build if there is a suitable one" snapshot dependency option and may trigger a new build if the parameter is set to a non-default value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With