在从 TeamCity 中的 SVN 拉取之前运行命令

发布于 2024-10-10 07:37:33 字数 400 浏览 0 评论 0原文

我在使用 TeamCity 时遇到问题,这与它在运行构建步骤之前运行源代码控制步骤这一事实有关。我的项目是一个Windows服务,所以这会很复杂。

TeamCity 经常决定删除项目目录的全部内容,即使我未选中 clean build 选项。但是,由于这是一项 Windows 服务,因此无法运行,因为当尝试删除 dll 时,由于它们正在使用,因此会出错:

应用补丁时出错:无法删除:F:\PathToService\bin\Release \Library.dll

最令人沮丧的是,这些 dll 甚至不受源代码控制,TeamCity 似乎有自己的想法并决定无论如何删除它们。

有没有办法解决这个问题,能够在执行 svn 签出之前运行构建步骤,以便我可以先停止 Windows 服务?

I'm having an issue with TeamCity, which relates to the fact that it runs the source control step before it runs the build steps. My project is a windows service, so there are complications with this.

TeamCity often decides to delete the entire contents of the project directory, even though I have the clean build option unchecked. However, since this is a windows service this does not fly, as when trying to delete the dll's it errors out since they're in use:

Error while applying patch: Failed to delete: F:\PathToService\bin\Release\Library.dll

The most frustrating part is that the dll's aren't even under source control, TeamCity seems to have a mind of its own and decides to delete them anyway.

Is there a way to get around this, to be able to run a build step BEFORE doing the svn checkout so that I can stop the windows service first?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

忘年祭陌 2024-10-17 07:37:33

我会尝试设置你的 CI 环境,以便在你完成测试后它会卸载 Windows 服务。我不知道 Teamcity 预结账挂钩。

I would try to set up your CI environment so it uninstalls the windows service once you are done testing it. I am not aware of Teamcity pre-checkout hook.

∞琼窗梦回ˉ 2024-10-17 07:37:33

答案是将每个服务拆分到一个单独的工作目录中。这可以防止 teamcity 删除 dll。

The answer was to split up each service into a separate working directory. That prevents teamcity from deleting the dll's.

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