When I copy a Project which uses templates, all the dependencies in those templates appear to be "absolute". That is after copying,it appears the new projects build configurations dependencies will all point back to the original build configurations.
Is there a way to make this work so that the dependencies in the templates are "relative" to the project?
Thanks
You can create new build configurations based on a template. You can associate/attach any number of existing build configurations with/to a template: there is the Attach to template option available from the Actions button in the upper right corner of the screen.
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).
The Artifact Dependency Graph (ADG) of an artifact is the recursive DAG (Directed Acyclic Graph) of all the input artifacts that are transformed by a build tool into that artifact. It includes the direct input artifacts, and the recursive set of artifacts to each input artifact, all the way down to source code.
Artifact Paths Build artifacts are files produced by the build which are stored on TeamCity server and can be downloaded from the TeamCity UI or used as artifact dependencies by other builds.
AFAIK it just can't be done at the moment. A search in the bug database of TeamCity leads to three bugs/requests:
TW-18304 Support project relative snapshot dependencies in a build configuration template (OPEN)
Which corresponds to your question, but is considered to be a duplicate of
TW-3287 Project templates (OPEN)
But a comment of TW-3287 also suggests the use of:
TW-4612 Project-level properties (FIXED)
So, you might be able to use project level properties to serve your needs. Depending on how the projects differ, you can base the build configurations in the different projects on common templates which in turn are parametrized with properties that you define on the project level. The templates should not contain dependencies, you will need to configure these in the 'original' project. According to a comment on TW-18304, a simple copy of the project should then actually keep the references within the newly copied project. Haven't tried any of this, but it might be worth a try.
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