Our Jenkins server has been recently upgraded. I am not sure about the plugin versions used before except for the Git Client plugin, which was 1.4.5.
After the upgrade several jobs, which relied on submodules stopped working because submodules were no longer fetched. I had to manually add the following snippet to the job configuration file in order to workaround the problem. I've also added a pre-step to run "git submodule status" so the revision number is visible in the logs.
<hudson.plugins.git.extensions.impl.SubmoduleOption>
<disableSubmodules>false</disableSubmodules>
<recursiveSubmodules>true</recursiveSubmodules>
</hudson.plugins.git.extensions.impl.SubmoduleOption>
I expected Git Plugin 2.0.1 to keep on updating submodules by default like it happened before. Furthermore, currently the "Disable submodules processing" checkbox lacks any meaning since they are disabled by default.
Here are excerpts from hudson.Proc log before and after the fix.
BEFORE
Running: git fetch --tags --progress ssh://gerritmirror:29418/tools/e4b +refs/heads/:refs/remotes/origin/
Running: git config remote.origin.url ssh://gerritmirror:29418/tools/e4b
Running: git fetch --tags --progress ssh://gerritmirror:29418/tools/e4b refs/changes/64/166564/1
Running: git rev-parse 3a97095d4de19552d9520491a186de73ed6477c5^{commit}
Running: git checkout -f 3a97095d4de19552d9520491a186de73ed6477c5
Running: git rev-parse FETCH_HEAD^{commit}
Running: git rev-list e7277f677fddf04ac67fac0dd922fbe53908093e
Running: git whatchanged --no-abbrev -M --pretty=raw -n 1024 3a97095d4de19552d9520491a186de73ed6477c5 ^e7277f677fddf04ac67fac0dd922fbe53908093e
Running: git tag -a -f -m Jenkins Build #33 jenkins-e4b-eclipse3-review-33
Running: /usr/bin/Xvfb :420 -screen 0 1024x768x24 -fbdir /proj/CoolTools/.builds/eselnlx1443/2014-01-27_15-45-23430600278062191031xvfb -auth /dev/null -audit 4
AFTER
Running: git rev-parse --is-inside-work-tree
Running: git config remote.origin.url ssh://gerritmirror:29418/tools/e4b
Running: git fetch --tags --progress ssh://gerritmirror:29418/tools/e4b refs/changes/64/166564/1
Running: git rev-parse 3a97095d4de19552d9520491a186de73ed6477c5^{commit}
Running: git checkout -f 3a97095d4de19552d9520491a186de73ed6477c5
Running: git rev-parse FETCH_HEAD^{commit}
Running: git rev-list e7277f677fddf04ac67fac0dd922fbe53908093e
Running: git whatchanged --no-abbrev -M --pretty=raw -n 1024 3a97095d4de19552d9520491a186de73ed6477c5 ^e7277f677fddf04ac67fac0dd922fbe53908093e
Running: git tag -a -f -m Jenkins Build #37 jenkins-e4b-eclipse3-review-37
Running: git remote
Running: git submodule init
Running: git submodule sync
Running: git config --get remote.origin.url
Running: git submodule update --init --recursive
Running: /usr/bin/Xvfb :409 -screen 0 1024x768x24 -fbdir /proj/CoolTools/.builds/eselnlx1443/2014-01-27_17-26-069168320542076878514xvfb -auth /dev/null -audit 4
|