使用 TeamCity 构建模板如何删除“构建前清理所有文件”从模板?

发布于 2024-12-10 12:14:06 字数 217 浏览 0 评论 0原文

我有许多日常和响应 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

韬韬不绝 2024-12-17 12:14:06

在每个项目的“版本控制设置”中,查看“签出设置”下的内容。有一些选项可以指定签出目录,还有一个复选框可以在构建之前清理文件。

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.

你在我安 2024-12-17 12:14:06

您可以添加一个附加构建功能(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

和影子一齐双人舞 2024-12-17 12:14:06

在我看来,您需要一个每日构建模板和一个夜间构建模板。

Seems to me that you need one template for daily and one for nightly builds.

ヅ她的身影、若隐若现 2024-12-17 12:14:06

我非常不喜欢接受的答案,因此我在构建的脚本中添加了条件烧焦。

然后,您可以在模板中设置默认值并覆盖需要烧焦的模板,或者在选择退出的基础上定义它。

Get-ChildItem . -Include obj,bin -Recurse -Force | Remove-Item -Recurse -Force
Remove-Item Artifacts -Recurse -Force

为什么要用如此难看的黑客来回答呢?我希望有人能提出一个真正的解决方案,然后[然后否决这个或最好]评论。

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.

Get-ChildItem . -Include obj,bin -Recurse -Force | Remove-Item -Recurse -Force
Remove-Item Artifacts -Recurse -Force

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.

天煞孤星 2024-12-17 12:14:06

有一种方法可以在模板中声明变量并用每个构建项目中的配置参数替换它们。请参阅 [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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文