我的源代码管理文件位于 Linux for TeamCity 中的什么位置
我想知道当我在 TeamCity 中指定源代码管理时,文件会签出到哪里。我用谷歌搜索但找不到它被签出的路径。我在我的主文件夹中的 .BuildServer 目录中进行了搜索,但没有成功。有人可以帮我吗?
I want to know where do the files get checked out to when I specify the source control in TeamCity. I googled but cannot find which path it is being checked out to. I searched inside the .BuildServer directory inside my home folder but no luck. Can someone please help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Windows 机器上,签出被放入构建代理内的
work
目录中。我假设在 Linux 上也是一样的。 TeamCity 文档似乎证实了这一点。签出目录的名称类似于哈希值。在
directory.map
文件中查找哪个目录代表哪个构建配置的映射。要回答评论中的问题:
为此,您可以添加一个构建步骤来进行修改(使用您必须创建的一些自定义逻辑)作为构建的第一步。我建议更改您的测试,以便它们的工作方式与从源代码控制中干净签出时相同。这将确保您的测试能够以一致的方式重复。这可能会需要更多工作,但从长远来看,它会得到回报,特别是如果您的测试在 TeamCity 中失败但在您的计算机上失败 - 这是一种很难调试的情况。
On a Windows box, checkouts get put into the
work
directory inside the build agent. I'm making the assumption that it will be same on linux. The TeamCity docs seem to confirm this.The checkout directories' names resemble hashes. Look in the
directory.map
file for a mapping of which directory represents which build configuration.To answer your question in the comment:
To do this, you could add a build step that does the modification (using some custom logic that you would have to create) as the first step of the build. I would recommend changing your tests so that they work the same way as when cleanly checked-out from source control. This will ensure that your tests are repeatable in a consistent manner. It might be more work, but it will pay off in the longer term, especially if your tests fail in TeamCity but not on your machine - a difficult situation to debug.