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

Git submodules are cloned too early and not removed once the revToBuild has been checked out

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      See http://pastebin.com/UkFcVesT for "extra" git tasks being ran.

      L4 clones the HEAD branch (usually master)
      L7 and L8 bring in the HEAD's submodules.
      L13 check's out the branchToBuild.

      L14-L16 update the submodules to match the branchToBuild. But does not delete any submodules present in HEAD, but not present in branchToBuild.

      The current process is:
      clone, fetch, submodule init, submodule update, rev-parse, checkout, submodule init, submodule sync, submodule update

      The correct proecess should be:
      clone, fetch, rev-parse, checkout, submodule init, submodule sync, submodule update

      I've forked the plugin on github and will commit a fix once I have the Issue #...

        Attachments

          Issue Links

            Activity

            kiall kiall created issue -
            Hide
            kiall kiall added a comment -

            Bugfix commit: https://github.com/kiall/Hudson-GIT-plugin/commit/8b021ab9e9ccf5bc334aa7d51a9e14b1c1b1f97d

            These changes should not introduce any un-wanted behavior. They will not fix this issue in its entirety! From the commit log:

            "JENKINS-8503 Removing an extra un-necessary git submodule init/update which causes delete submodules to stay when changing branch.

            This will only work reliably when Wipe Out Workspace is enabled. To my knowledge Git does not offer a mechanism for removing submodules without parsing the old/new .gitmodules and rm -rf'ing the deleted submodules."

            Show
            kiall kiall added a comment - Bugfix commit: https://github.com/kiall/Hudson-GIT-plugin/commit/8b021ab9e9ccf5bc334aa7d51a9e14b1c1b1f97d These changes should not introduce any un-wanted behavior. They will not fix this issue in its entirety! From the commit log: " JENKINS-8503 Removing an extra un-necessary git submodule init/update which causes delete submodules to stay when changing branch. This will only work reliably when Wipe Out Workspace is enabled. To my knowledge Git does not offer a mechanism for removing submodules without parsing the old/new .gitmodules and rm -rf'ing the deleted submodules."
            olsonse olsonse made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            olsonse olsonse made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            Hide
            orgads Orgad Shaneh added a comment -

            Any news on this?

            Show
            orgads Orgad Shaneh added a comment - Any news on this?
            markewaite Mark Waite made changes -
            Link This issue is related to JENKINS-22510 [ JENKINS-22510 ]
            avalokita Kelly Johnson made changes -
            Link This issue is related to JENKINS-14083 [ JENKINS-14083 ]
            avalokita Kelly Johnson made changes -
            Link This issue is related to JENKINS-15399 [ JENKINS-15399 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 138613 ] JNJira + In-Review [ 174940 ]
            markewaite Mark Waite made changes -
            Assignee Andrew Bayer [ abayer ]

              People

              • Assignee:
                Unassigned
                Reporter:
                kiall kiall
              • Votes:
                5 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: