Source Branch(build.sourcebranch)设置为root($ /) [英] Source Branch (build.sourcebranch) is set to root ($/)

查看:122
本文介绍了Source Branch(build.sourcebranch)设置为root($ /)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有共享脚本和nuget.config文件的公共存储库( http:// servername / tfs / DefaultCollection / Common )和项目存储库( http:// servername / tfs / DefaultCollection / FabrikamFiber )。


我们每个项目的vNext构建包括Nuget Installer,PowerShell和Visual Studio Build构建任务。 Nuget安装程序和PowerShell构建任务引用公共存储库中的脚本和nuget.config文件。


最初,存储库选项卡仅引用项目的服务器路径。此构建失败,因为Nuget Installer和PowerShell构建任务引用的脚本和nuget.config不可用。请注意,此时构建的源分支
准确反映了项目的位置,并且关联更改是正确的。


然后更新存储库选项卡以包括服务器路径对于nuget.config文件和构建脚本,构建成功运行,但源根现在设置为$ /和构建"关联的更改"。显示自上次成功构建以来根据
所做的所有更改。


配置这些构建的正确方法是什么,以便不在存储库中多次复制公共文件但是为构建引用了正确的源分支和相关更改?


谢谢!

解决方案

这已经通过TFS 2017u1进行了改进,其中映射路径是关联的,但它仍将计算根分支为


/。



要真正解决这个问题,您可能需要添加一个自定义步骤,从源控件或nuget或其他地方获取这些额外文件,或将这些文件分支到项目存储库中。


We have a common repository for shared scripts and nuget.config files (http://servername/tfs/DefaultCollection/Common) and project repositories (http://servername/tfs/DefaultCollection/FabrikamFiber).

vNext builds for each of our projects include the Nuget Installer, a PowerShell and Visual Studio Build build tasks. The Nuget Installer and PowerShell build tasks reference scripts and nuget.config file in the common repository.

Initially the repository tab only referenced the server path for the project. This build failed because the script and nuget.config referenced by the Nuget Installer and PowerShell build tasks were not available. Note that at this point the Source Branch for the build accurately reflected the location of the project and the Associated Changes were correct.

Then the repository tab was updated to include server paths for the nuget.config file and build scripts, the build ran successfully but the source root is now set to $/ and the build "Associated Changes" shows all changes made from the root down since the last successful build.

What is the proper way to configure these builds so that common files are not copied multiple times within the repository but the correct source branch and associated changes are referenced for the build?

Thank you!

解决方案

This has since been improved with TFS 2017u1, where the mapped paths are associated, though it will still calculate the root branch as


/.

To really fix this, you'll probably need to add a custom step which fetches these extra files from source control or nuget or somwhere else, or branch these files into the project repository.


这篇关于Source Branch(build.sourcebranch)设置为root($ /)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆