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

Clone workspace doesn't copy empty directories when cloning entire workspace

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Linux

      Currently clone workspace uses a */ glob to copy an entire workspace which causes it to miss empty directories. This can cause problems building if build scripts expect a directory to be present, even if it's empty (say a plugins directory).

          [JENKINS-7260] Clone workspace doesn't copy empty directories when cloning entire workspace

          mleinart created issue -

          I've just been hit by this too. Is there an Ant include pattern which can be used to include empty directories?

          Glenn J. Mason added a comment - I've just been hit by this too. Is there an Ant include pattern which can be used to include empty directories?

          jfigler added a comment -

          Hi – I'm curious if anyone knows of a workaround for this issue?

          jfigler added a comment - Hi – I'm curious if anyone knows of a workaround for this issue?

          Would also be interested in a workaround.

          As a result of this, mvn release:prepare fails when attempting to use it on a cloned workspace, because the .svn/tmp folder is gone.

          It's possible to recreate it manually with a batch script and to run svn cleanup in a pre-build step, but it's kind of a drag obviously. Didn't find a globbing alternative pattern to fix this.

          Laurent Malvert added a comment - Would also be interested in a workaround. As a result of this, mvn release:prepare fails when attempting to use it on a cloned workspace, because the .svn/tmp folder is gone. It's possible to recreate it manually with a batch script and to run svn cleanup in a pre-build step, but it's kind of a drag obviously. Didn't find a globbing alternative pattern to fix this.

          Etienne Bec added a comment -

          I created a PR which add an option to copy empty directories: https://github.com/jenkinsci/jenkins-clone-workspace-scm-plugin/pull/12

          Etienne Bec added a comment - I created a PR which add an option to copy empty directories: https://github.com/jenkinsci/jenkins-clone-workspace-scm-plugin/pull/12
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 137359 ] New: JNJira + In-Review [ 174689 ]
          Andrew Bayer made changes -
          Assignee Original: Andrew Bayer [ abayer ]
          Jenkins IRC Bot made changes -
          Component/s New: clone-workspace-scm-plugin [ 16060 ]
          Component/s Original: clone-workspace-plugin [ 15700 ]

            Unassigned Unassigned
            mleinart mleinart
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: