简体   繁体   English

TFS 2012中的持续集成触发器问题

[英]Issues with Continuous Integration trigger in TFS 2012

I have multiple solutions and common references for all my solutions in the source of my TeamProject as below. 在TeamProject的源代码中,我有多个解决方案和所有解决方案的通用参考,如下所示。

TestTeamProject
    Source
       SolutionA
       SolutionB
       SolutionC
       References

All the solutions uses Referneces and each solution has a separate build definition. 所有解决方案都使用Referneces,并且每个解决方案都有单独的内部定义。 Whenever the build is triggered , a custom activity runs that check-ins their own binaries to the References folder( EX : If the Build Definition configured for SOlution A is triggered it copies the output dlls to References folder), since each solution has dependancies on each other. 每当触发构建时,都会运行一个自定义活动,将其自己的二进制文件签入到References文件夹中(例如:如果触发了为解决方案A配置的构建定义,它将复制输出dll到References文件夹中),因为每种解决方案都依赖于彼此。

Now i tried enabling continuous integration trigger on the Build Definition of SolutionA and it is going into a loop and triggering infinite builds. 现在,我尝试在SolutionA的“构建定义”上启用连续集成触发器,该触发器进入循环并触发无限构建。

Reason : Since i have References under the source settings of the Build Definition of Solution A , when ever the build is completed and the references are checked in by my activity, it is again triggering CI build 原因 :由于我在解决方案A的“构建定义”的源设置下具有“引用”,因此一旦构建完成并且我的活动将引用检入,它再次触发CI构建

Is there any way i could restrict this behaviour by still enabling the CI trigger feature? 有什么办法可以通过仍然启用CI触发功能来限制此行为? Is there any extension that could be used to use filters for source control paths while setting up CI builds? 设置CI版本时,是否可以使用任何扩展将过滤器用于源代码控制路径?

而不是让二进制文件放入源代码控制中,您应该使用NuGet软件包并将二进制依赖项作为NuGet软件包进行引用。

You can try to use the cloaked in the source settings-working folders to select the version control paths you want to include and exclude. 您可以尝试使用源设置-工作文件夹中的伪装来选择要包括和排除的版本控制路径。 (Note: suggest you to make sure these filters are consistent with your TFVC workspace mappings.) (注意:建议您确保这些过滤器与TFVC工作区映射一致。)

For your situation you can cloaked the references folder 根据您的情况,您可以隐藏“引用”文件夹 在此处输入图片说明

And since you are using the dll in references. 并且由于您在引用中使用dll。 The best way just as Daniel suggest using a package management system such as Nuget to host and deploy your dependencies can eliminate them from source control and allow you avoid the endless loop. 正如Daniel所建议的那样,使用包管理系统(如Nuget)托管和部署依赖项的最佳方法可以从源代码控制中消除它们,并避免无休止的循环。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM