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

git - clean before build does not clean submodules

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • hudson 1.366, git plugin 1.0.1

      When using a repository containing submodules, if the project is set to clean after the checkout, the git clean -fdx command is issued. However, the clean command will not iterate through submodules, resulting in the submodules still containing private content (debris from past builds.) Would it be possible to get the clean code changed to iterate through the submodules and perform a git clean -fdx within each as well?

          [JENKINS-7376] git - clean before build does not clean submodules

          aaron_neerenberg created issue -
          aaron_neerenberg made changes -
          Environment Original: hudson 1.366, git plugin New: hudson 1.366, git plugin 1.0.1

          Andrew Bayer added a comment -

          Ah, easy fix, I think - pushing change up to master now.

          Andrew Bayer added a comment - Ah, easy fix, I think - pushing change up to master now.

          dogfood added a comment -

          Integrated in plugins_hudson-git-plugin #22
          JENKINS-7376 Calling git clean in submodules as well now

          Andrew Bayer :
          Files :

          • src/main/java/hudson/plugins/git/GitSCM.java

          dogfood added a comment - Integrated in plugins_hudson-git-plugin #22 JENKINS-7376 Calling git clean in submodules as well now Andrew Bayer : Files : src/main/java/hudson/plugins/git/GitSCM.java
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-7445 [ JENKINS-7445 ]
          Andrew Bayer made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Rafal Zwierz added a comment -

          This issue has raised its ugly head again. There is one path through checkout function which doesn't clean submodules (even though it does clean the superproject). I have a fix for it and will raise a pull request.

          Rafal Zwierz added a comment - This issue has raised its ugly head again. There is one path through checkout function which doesn't clean submodules (even though it does clean the superproject). I have a fix for it and will raise a pull request.
          Rafal Zwierz made changes -
          Assignee Original: Andrew Bayer [ abayer ] New: Rafal Zwierz [ rzwierz ]
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Rafal Zwierz made changes -
          Status Original: Reopened [ 4 ] New: Open [ 1 ]

          Code changed in jenkins
          User: Rafal Zwierz
          Path:
          src/main/java/hudson/plugins/git/GitSCM.java
          http://jenkins-ci.org/commit/git-plugin/abe5ceb1a045655d1df2177347babc5f4f6ff3c7
          Log:
          JENKINS-7376 Clean submodules whenever cleaning superproject (after checkout), unless submodules are disabled

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rafal Zwierz Path: src/main/java/hudson/plugins/git/GitSCM.java http://jenkins-ci.org/commit/git-plugin/abe5ceb1a045655d1df2177347babc5f4f6ff3c7 Log: JENKINS-7376 Clean submodules whenever cleaning superproject (after checkout), unless submodules are disabled

            markewaite Mark Waite
            aaron_neerenberg aaron_neerenberg
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: