【发布时间】:2021-01-19 15:40:01
【问题描述】:
我在尝试访问 TFS Build 中的不同 git 源时遇到问题。
我有 2 个 repos Test1 & Test2 - https://tfs.org.com:8080/tfs/collection/project/_git/Test1 (& Test2)。在 Test2 下,我添加了一个 sample.txt & .gitmodules 文件。
.GitModules 文件有一个 cmd - git submodule add https://tfs.org.com:8080/tfs/collection/project/_git/Test1 (因为我想在触发 Test2 回购时也检查 Test1 的内容)
现在在 Build def(构建 Test2)中,我检查了选项(Checkout Submodules) - 并触发了构建。但我没有看到 Test1 的内容是在构建服务器中结帐。我怎样才能做到这一点?
注意:我已尝试使用在网上找到的其他选项 - 但没有运气。
[submodule "Test1"]
path = Test1
url = https://tfs.org.com:8080/tfs/collection/project/_git/Test1
(以上是我正在测试的POC,以使其在我们的实际环境中工作,即Azure DevOps - 使用OtherGit服务连接访问TFS以构建和发布)
这里是 Get Sources 的构建日志:
2020-10-04T15:16:20.1648800Z Entering TfsGitSourceProvider.PrepareRepositoryAsync
2020-10-04T15:16:20.1648800Z localPath=E:\Temp\1\s
2020-10-04T15:16:20.1648800Z clean=True
2020-10-04T15:16:20.1648800Z sourceBranch=refs/heads/master
2020-10-04T15:16:20.1648800Z sourceVersion=1cca491d4af9def54e8e9d11b3c6ffbb226ace21
2020-10-04T15:16:20.1648800Z Syncing repository: Test2 (Git)
2020-10-04T15:16:20.1648800Z repository url=https://tfs.org.com:8080/tfs/collection/project/_git/Test2
2020-10-04T15:16:20.1648800Z checkoutSubmodules=True
2020-10-04T15:16:20.2586300Z Running 'git clean -fdx' on E:\Temp\1\s.
2020-10-04T15:16:20.5555003Z Running 'git reset --hard HEAD' on E:\Temp\1\s.
2020-10-04T15:16:20.6648794Z HEAD is now at 043b897 Updated .gitmodules
2020-10-04T15:16:20.6805036Z Starting fetch...
2020-10-04T15:16:20.9930080Z Checking out 1cca491d4af9def54e8e9d11b3c6ffbb226ace21 to E:\Temp\1\s with submodules
2020-10-04T15:16:21.0398784Z Checked out branch refs/heads/master for repository Test2 at commit 1cca491d4af9def54e8e9d11b3c6ffbb226ace21
2020-10-04T15:16:21.0398784Z commit=1cca491d4af9def54e8e9d11b3c6ffbb226ace21
2020-10-04T15:16:21.0398784Z Leaving TfsGitSourceProvider.PrepareRepositoryAsync
【问题讨论】:
-
你应该有一些关于你的构建的 Git 签出过程的日志。您可以将这些添加到您的问题中吗?
-
@SorenBjornstad 添加了构建日志
-
@user2153844 我对它进行了测试,但措辞很好。看起来你的步骤是正确的。你能按照我的步骤再试一次吗?
-
@user2153844 好几天没有收到您的回复,请您分享一下有关此问题的最新信息吗?如果您仍然被阻止,请随时告诉我,我会尽力提供帮助:)
标签: git tfs azure-devops