从子文件夹构建 Teamcity 项目 - 结帐规则 "unsupported"

Teamcity Project build from sub folder - checkout rules "unsupported"

我有一个结构如下的回购协议:

repo\src\folder1\project1

repo\src\folder1\project2

我已将结帐规则更新为:+:src/folder1/project1 => . 但是当构建步骤中的 npm 命令是 运行(我还在下面添加了构建)时,我可以在构建日志中看到未应用结帐规则:

我在结帐规则中使用 UI 来 select 该项目所在的适当文件夹,但错误消息一点也不清楚。结帐规则有什么问题?如何在给定路径上构建?

构建步骤:

显然 Git 不支持它:

Limitations When using checkout on an agent, a limited subset of checkout rules is supported, because Git cannot clone a subdirectory of a repository. You can only map the whole repository to a specific directory using the following checkout rule +:.=>subdir. The rest of the checkout rules are not supported.

https://confluence.jetbrains.com/display/TCD9/Git#Git-Limitations

这使得结帐规则似乎基本上没有用。 我猜如果可能的话,这必须在构建步骤中完成。

但是,作为替代方案,可以通过 Working directory 参数修改 Build Step 以将构建定位到特定路径,这对我有用。