Ben Ben - 1 year ago 208
Git Question

git submodules not updating in Jenkins build

I have a submodule in a project in jenkins. I've enabled the advanced setting to recursively update submodules. When I run the build, I see that the workspace has the files from the submodule. The problem is, it seems to be the first revision of the submodule. When I push changes (repo hosted on github) jenkins doesn't seem to update the submodule to get the right changes. Has anyone ever seen this?

Ben Ben
Answer Source

Looks like I found a solution:

I added a build step to execute the following shell commands:

git submodule foreach git checkout master
git submodule foreach git pull
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download