我在 Jenkins 的项目中有一个子模块。我已启用高级设置以递归更新子模块。
当我运行构建时,我看到工作区中有来自子模块的文件。问题是,它似乎是子模块的第一次修订。当我推送更改(存储库托管在 GitHub 上)时,Jenkins 似乎没有更新子模块以获得正确的更改。有人见过这个吗?
最佳答案
请注意 Jenkins Git plugin 2.0将具有“高级子模块行为”,这应确保子模块的正确更新:
Advanced sub-modules behavior
> "Path of the reference repo to use during submodule update
" against this field , add submodule git url.
For the authentication issue, there's now a "Use credentials from default remote of parent repository" option
在 JENKINS-20941 中看到:
关于Git 子模块未在 Jenkins 构建中更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9953299/