如何解决TeamCity GitVersion无限循环错误?

问题描述 投票:1回答:1

TeamCity中的GitVersion过程出现奇怪的错误。它陷入由以下代码组成的无限循环。

branch0是branch1和branch2的父级。我正在尝试部署branch2,并且显示了与branch1相关的错误,它根本不应该与它建立任何连接。

[我也很好奇在这种情况下'develop'和'origin / develop'之间有什么区别,对我来说,它们应该是同一个远程分支,不是吗?

我怀疑分支之间相互关联的方式可能存在一些问题,但无法真正弄清楚。有趣的是,当我删除branch1时,我可以轻松地部署branch0和branch2。一旦我再次从branch0创建了branch1,然后再次失败。

Falling back to branch1 branch config
[15:07:52][Step 1/1]             INFO [05/25/20 15:07:52:16] No branch configuration found for branch branch1, falling back to default configuration
[15:07:52][Step 1/1]             INFO [05/25/20 15:07:52:16] Begin: Attempting to inherit branch configuration from parent branch
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:16] HEAD is merge commit, this is likely a pull request using master as base
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:17] Begin: Finding branch source of 'master'
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:17] Multiple source branches have been found, picking the first one (develop).
[15:07:52][Step 1/1] This may result in incorrect commit counting.
[15:07:52][Step 1/1] Options were:
[15:07:52][Step 1/1]  develop, origin/develop
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:17] End: Finding branch source of 'master' (Took: 1.00ms)
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:17] Begin: Getting branches containing the commit 'hash1'.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:17] Trying to find direct branches.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:17] No direct branches found, searching through tracked branches.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:17] Searching for commits reachable from 'develop'.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:20] The branch 'develop' has a matching commit.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:20] Searching for commits reachable from 'origin/develop'.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:24] The branch 'origin/develop' has a matching commit.
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:24] End: Getting branches containing the commit 'hash1'. (Took: 68.00ms)
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:24] Begin: Getting branches containing the commit 'hash2'.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:24] Trying to find direct branches.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:24] No direct branches found, searching through tracked branches.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:24] Searching for commits reachable from 'develop'.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:27] The branch 'develop' has a matching commit.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:27] Searching for commits reachable from 'origin/develop'.
[15:07:52][Step 1/1]                 INFO [05/25/20 15:07:52:30] The branch 'origin/develop' has a matching commit.
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:30] End: Getting branches containing the commit 'hash1'. (Took: 66.00ms)
[15:07:52][Step 1/1]               INFO [05/25/20 15:07:52:30] Found possible parent branches: 
[15:07:52][Step 1/1]               WARN [05/25/20 15:07:52:30] Failed to inherit Increment branch configuration, no branches found.```
git teamcity gitversion
1个回答
0
投票

经过一番尝试和错误之后,似乎最好的解决方案是为GitVersionConfig.yaml文件中的git commit更新忽略时间戳记

© www.soinside.com 2019 - 2024. All rights reserved.