2

我在本地 TFS2017 构建中遇到了问题。我们有一个带有 GitVersion 任务的项目,在使用拉取请求时找不到版本。我可以毫无问题地自行构建分支,但拉取请求会一直持续到 GitVersion.exe 以 stackoverflowexception 退出。

我尝试使用“commits-before:”忽略提交,并且对拉取请求进行了各种分支配置更改,但均无济于事。

日志中一遍又一遍地发生以下情况,直到异常...

Starting task: GitVersion  
Set workingFolder to default: D:\xxx\tasks\GitVersion\3.6.5   
Executing the powershell script: D:\xxx\tasks\GitVersion\3.6.5\GitVersion.ps1  
Current Directory:  D:\xxx\tasks\GitVersion\3.6.5 D:\xxx\_work\13\s  
Invoking GitVersion with D:\xxx\_work\13\s /output buildserver /nofetch /updateassemblyinfo true  
D:\xxx\tasks\GitVersion\3.6.5\GitVersion.exe D:\xxx\_work\13\s /output buildserver /nofetch /updateassemblyinfo true  
INFO [02/13/17 15:43:21:08] Working directory: D:\xxx\_work\13\s  
INFO [02/13/17 15:43:21:09] IsDynamicGitRepository: False  
INFO [02/13/17 15:43:21:11] Returning Project Root from DotGitDirectory: D:\xxx\_work\13\s\.git - D:\xxx\_work\13\s  
[02/13/17 15:43:21:11] Running on Windows.  
INFO [02/13/17 15:43:21:11] Applicable build agent found: VsoAgent.  
INFO [02/13/17 15:43:21:11] Branch from build environment: refs/pull/2336/merge  
INFO [02/13/17 15:43:40:31] IsDynamicGitRepository: False  
INFO [02/13/17 15:43:40:31] Returning Project Root from DotGitDirectory: D:\xxx\_work\13\s\.git - D:\xxx\_work\13\s  
INFO [02/13/17 15:43:40:31] Project root is: D:\xxx\_work\13\s  
INFO [02/13/17 15:43:40:31] DotGit directory is: D:\xxx\_work\13\s\.git  
INFO [02/13/17 15:43:40:36] IsDynamicGitRepository: False  
INFO [02/13/17 15:43:40:36] Returning Project Root from DotGitDirectory: D:\xxx\_work\13\s\.git - D:\xxx\_work\13\s  
INFO [02/13/17 15:43:40:36] Begin: Loading version variables from disk cache  
INFO [02/13/17 15:43:40:36] Cache file D:\xxx\_work\13\s\.git\gitversion_cache\8BD4.yml not found.  
INFO [02/13/17 15:43:40:36] End: Loading version variables from disk cache (Took: 0.00ms)  
INFO [02/13/17 15:43:40:36] IsDynamicGitRepository: False  
INFO [02/13/17 15:43:40:36] Returning Project Root from DotGitDirectory: D:\xxx\_work\13\s\.git - D:\xxx\_work\13\s  
INFO [02/13/17 15:43:40:52] Using latest commit on specified branch  
INFO [02/13/17 15:43:40:52] Begin: Attempting to inherit branch configuration from parent branch  
INFO [02/13/17 15:43:40:58] HEAD is merge commit, this is likely a pull request using devops/gitver-testingv5 as base  
INFO [02/13/17 15:43:40:66] Begin: Finding branch source  
INFO [02/13/17 15:43:40:70] Begin: Found merge base of ded0 against hotfix/white-42630-customerrors-fix  
INFO [02/13/17 15:43:40:72] End: Found merge base of ded03 against hotfix/white-42630-customerrors-fix (Took: 15.63ms)  
INFO [02/13/17 15:43:40:72] Begin: Found merge base of ad42 against master  
INFO [02/13/17 15:43:40:72] Merge base was due to a forward merge, moving to next merge base  
INFO [02/13/17 15:43:40:72] End: Found merge base of ad42 against master (Took: 0.00ms)  
INFO [02/13/17 15:43:40:73] Begin: Found merge base of 665d against Release/1.47.0  
INFO [02/13/17 15:43:40:73] Merge base was due to a forward merge, moving to next merge base  
INFO [02/13/17 15:43:40:73] End: Found merge base of 665d against Release/1.47.0 (Took: 0.00ms)  
INFO [02/13/17 15:43:40:73] Begin: Found merge base of 05651 against Release/1.47.3  
INFO [02/13/17 15:43:40:73] End: Found merge base of 0565 against Release/1.47.3 (Took: 0.00ms)  
INFO [02/13/17 15:43:40:73] Begin: Found merge base of ab58 against Release/1.47.4  
INFO [02/13/17 15:43:40:73] End: Found merge base of ab58 against Release/1.47.4 (Took: 0.00ms)  
INFO [02/13/17 15:43:40:73] Begin: Found merge base of 4984 against Release/1.48.0  
INFO [02/13/17 15:43:40:73] Merge base was due to a forward merge, moving to next merge base  
INFO [02/13/17 15:43:40:73] End: Found merge base of 4984 against Release/1.48.0 (Took: 0.00ms)  
INFO [02/13/17 15:43:40:73] Begin: Found merge base of ad42 against Release/1.49.0  
INFO [02/13/17 15:43:40:73] Merge base was due to a forward merge, moving to next merge base  
INFO [02/13/17 15:43:40:75] End: Found merge base of ad42 against Release/1.49.0 (Took: 15.62ms)  
INFO [02/13/17 15:43:40:80] Begin: Found merge base of d782 against Release/2016-07-21_Release  
INFO [02/13/17 15:43:40:80] End: Found merge base of d782 against Release/2016-07-21_Release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:80] Begin: Found merge base of 6286 against Release/2016-08-04_Release  
INFO [02/13/17 15:43:40:80] End: Found merge base of 6281 against Release/2016-08-04_Release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:81] Begin: Found merge base of bfb7 against Release/2016-08-18_Release  
INFO [02/13/17 15:43:40:81] Merge base was due to a forward merge, moving to next merge base  
INFO [02/13/17 15:43:40:81] Merge base was due to a forward merge, moving to next merge base  
INFO [02/13/17 15:43:40:81] End: Found merge base of bfb7 against Release/2016-08-18_Release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:81] Begin: Found merge base of d7a5 against Release/2016-09-01_Release  
INFO [02/13/17 15:43:40:81] Merge base was due to a forward merge, moving to next merge base  
INFO [02/13/17 15:43:40:83] End: Found merge base of d7a against Release/2016-09-01_Release (Took: 15.63ms)  
INFO [02/13/17 15:43:40:83] Begin: Found merge base of 425c against Release/2016-09-15_Release  
INFO [02/13/17 15:43:40:83] End: Found merge base of 425c against Release/2016-09-15_Release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:83] Begin: Found merge base of f9df against Release/2016-09-29_release  
INFO [02/13/17 15:43:40:83] End: Found merge base of f9df against Release/2016-09-29_release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:84] Begin: Found merge base of 8b07 against Release/2016-10-07_Release  
INFO [02/13/17 15:43:40:84] End: Found merge base of 8b07 against Release/2016-10-07_Release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:84] Begin: Found merge base of 9be6 against Release/2016-10-13_release  
INFO [02/13/17 15:43:40:84] End: Found merge base of 9be6 against Release/2016-10-13_release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:84] Begin: Found merge base of 1e90 against Release/2016-10-27_release  
INFO [02/13/17 15:43:40:84] End: Found merge base of 1e90 against Release/2016-10-27_release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:84] Begin: Found merge base of 64f4 against Release/2016-11-10_Release  
INFO [02/13/17 15:43:40:84] End: Found merge base of 64f4 against Release/2016-11-10_Release (Took: 0.00ms)  
INFO [02/13/17 15:43:40:86] End: Finding branch source (Took: 203.13ms)  
INFO [02/13/17 15:43:40:86] Begin: Getting branches containing the commit ad42.  
INFO [02/13/17 15:43:40:86] Trying to find direct branches.  
INFO [02/13/17 15:43:40:86] No direct branches found, searching through tracked branches.  
INFO [02/13/17 15:43:40:87] End: Getting branches containing the commit ad42. (Took: 15.63ms)  
INFO [02/13/17 15:43:40:87] Found possible parent branches:   
WARN [02/13/17 15:43:40:91] Failed to inherit Increment branch configuration, no branches found.  
Falling back to feature/merge-rc-to-master branch config
4

3 回答 3

2

因此,根据github 上的评论,我将全局配置中的拉取请求更改为InheritanceNone这并没有解决问题,但它确实让我意识到版本控制尝试的每次迭代都会返回到这个分支feature/merge-rc-to-master及其配置。

在尝试对该分支进行拉取请求并看到相同的问题后,我们删除了该分支(PR 已被放弃,代码之前已添加到 master)。现在所有的 PR 都重新开始工作了。

于 2017-02-14T20:25:18.703 回答
0

如果我理解正确,您正在使用GitVersion 扩展并启用“自动构建拉取请求”分支策略,如下图所示:

在此处输入图像描述

我已经使用 GitVersion 任务创建了一个构建定义,当创建一个新的拉取请求时,构建排队没有问题。您可以将我的设置与您的设置进行比较并尝试新的构建。

在此处输入图像描述

在此处输入图像描述

如果有误解,请提供详细的步骤来重现您的问题。

于 2017-02-14T09:09:34.757 回答
0

如果有帮助

我有类似的问题,但在 AZ Devops git 存储库中。

在我的gitVersion.ymlmaster分支部分中,我更新 increment: Inheritincrement: Patch

于 2021-03-03T01:07:09.793 回答