在TFS 2010
中,我正在寻找一种方法来拥有多个构建定义,这些构建定义都构建在同一个代理文件夹中。这样做的原因是我试图实现Gated Checkin但不想每次都要构建整个分支,因此我创建了多个构建,只构建了解决方案/项目的子集。
Example Branch:
MyBranch:
- Folder1
* Solution1A
* Solution1B
- Folder2
* Solution2A
* Solution2B
示例构建定义:
- MyBranchBuild - builds all solutions in all folders
- MyBranchFolder1Build - builds all solutions under Folder1
- MyBranchFolder2Build - builds all solutions under Folder2
示例构建代理:
- GateAgent1
* Builds in C:\GateAgent1\MyBranch
- GateAgent2
* Builds in C:\GateAgent2\MyBranch
Currently MyBranchBuild contains in the Workspace definition "Build Agent Folder":
- $(BuildDir)\Folder1
- $(BuildDir)\Folder2
MyBranchFolder1Build
和MyBranchFolder2Build
仅包含其目标文件夹的工作区映射。
GateAgent1& 2使用以下工作目录中的变体:
C:\GateAgent1\$(BuildDefinitionPath)
我的结果版本将转到
- C:\GateAgent1\MyBranchBuild
- C:\GateAgent1\MyBranchFolder1Build
- C:\GateAgent1\MyBranchFolder2Build
同样,我的目标是在3下构建:
- C:\GateAgent1\MyBranch
答案 0 :(得分:0)
您可以在代理属性下的工作目录中指定硬编码的分支名称,而不是$(BuildDefinitionPath)属性。
答案 1 :(得分:0)
想出来。