Ben Ben - 5 months ago 59
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

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