Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21521

Submodules are disabled by default as of git plugin 2.0.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • git-plugin
    • None
    • Jenkins Core LTS 1.532.1, Git Plugin 2.0.1, Git Client Plugin 1.6.1

      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 submodule revision numbers are logged. This would have simplified debugging.

      <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

            Unassigned Unassigned
            mkalkov Mikhail Kalkov
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: