开发者

How do you make dependencies relative when using TeamCity Templates?

开发者 https://www.devze.com 2023-04-06 06:49 出处:网络
When I copy a Project which uses templates开发者_Go百科, all the dependencies in those templates appear to be \"absolute\". That is after copying,it appears the new projects build configurations depen

When I copy a Project which uses templates开发者_Go百科, 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消