Git 子模块未在 Jenkins 构建中更新

标签 git jenkins git-submodules

我在 Jenkins 的项目中有一个子模块。我已启用高级设置以递归更新子模块。

当我运行构建时,我看到工作区中有来自子模块的文件。问题是,它似乎是子模块的第一次修订。当我推送更改(存储库托管在 GitHub 上)时,Jenkins 似乎没有更新子模块以获得正确的更改。有人见过这个吗?

最佳答案

请注意 Jenkins Git plugin 2.0将具有“高级子模块行为”,这应确保子模块的正确更新:

git 2.0

作为commented通过 vikramvi :

Advanced sub-modules behavior > "Path of the reference repo to use during submodule update" against this field , add submodule git url.

Path


Owen B提及 in the comments :

For the authentication issue, there's now a "Use credentials from default remote of parent repository" option

JENKINS-20941 中看到:

https://issues.jenkins-ci.org/secure/attachment/33245/Screen%20Shot%202016-07-08%20at%2010.09.17.png

关于Git 子模块未在 Jenkins 构建中更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9953299/

相关文章:

git - 使用 Git 集成进行项目管理

git - 为什么我必须在更改提交消息后强制推送?

git - 将现有源代码文件夹添加到本地 Git 存储库

jenkins - Groovy 执行带引号的命令

java - 进程显然从未在 C :\Users\<user>\. jenkins\workspace\<jenkin_project>@tmp\durable-d3479d32 脚本返回退出代码 -2 中启动

git - 来自 github 的子目录作为 git 子模块

Git:致命:Pathspec 在子模块中

Eclipse - 从 git 存储库中排除根目录?

oracle - Jenkins 构建永无止境

Git 不跟踪子目录