使用 TeamCity 构建模板如何删除“构建前清理所有文件”从模板?
我有许多日常和响应 svn-change 的构建,它们都源自相同的配置模板。我可以对其进行设置,以便选择要查看的分支、要执行的构建步骤以及触发构建的内容。
然而,我希望每日构建能够进行完全干净的检查,而依赖 svn 的构建(显然全天都会发生)我很高兴他们只需进行更新。
简单地取消设置模板中的选项并不能让我在每个派生版本中设置它们。是否有一个构建参数可以用来为需要它的构建打开干净的构建?
I have a number of daily and in-response-to-svn-change builds that all derive from the same configuration template. I can set it so I can choose what branch to look at, what build steps to carry out and of course what triggers the build.
However I would like the daily builds to do a completely clean checkout, whereas the svn dependent ones (that obviously happen throughout the day) I am happy for them to simply to an update.
Simply un-setting the option in the template does not let me set them in each of the derived builds. Is there a build parameter that I can use to switch on clean builds for those builds that require it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在每个项目的“版本控制设置”中,查看“签出设置”下的内容。有一些选项可以指定签出目录,还有一个复选框可以在构建之前清理文件。
In each Project's "Version Control Settings", look under "Checkout setting". There are options to specify the checkout dir and also a checkbox to clean files before a build.
您可以添加一个附加构建功能(Swabra),如果需要,它可以进行干净的结帐。我已为我们的夜间构建启用了此功能,但尚未调查后果。
有关 Swabra 的更多详细信息,请参阅此处
There is an Additional Build Feature (Swabra) you can add that does a clean checkout if required.I have enabled this for our nightly builds but have not yet investigated the consequences.
See here for more detail on Swabra
在我看来,您需要一个每日构建模板和一个夜间构建模板。
Seems to me that you need one template for daily and one for nightly builds.
我非常不喜欢接受的答案,因此我在构建的脚本中添加了条件烧焦。
然后,您可以在模板中设置默认值并覆盖需要烧焦的模板,或者在选择退出的基础上定义它。
为什么要用如此难看的黑客来回答呢?我希望有人能提出一个真正的解决方案,然后[然后否决这个或最好]评论。
I so disliked the Accepted Answer that I put a conditional scorch into my built script.
Then I you can either set a default in the template and override in the one that needs the scorching or define it on an opt-out basis.
Why answer with such an unsightly hack? I'm hoping someone will chime in with a real solution and [then downvote this or preferably] comment.
有一种方法可以在模板中声明变量并用每个构建项目中的配置参数替换它们。请参阅 [link] http://blogs 了解更多详细信息。 jetbrains.com/teamcity/2010/10/14/overriding-template-settings/
There's a way to declare variables in the template and substitute them with configuration parameters in each build project. Please refer more details at [link] http://blogs.jetbrains.com/teamcity/2010/10/14/overriding-template-settings/