• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • copy-to-slave-plugin
    • None
    • Master: Windows 7, Jenkins 1.425, copy-to-slave 1.3
      Slave: Linux Ubuntu 8.1.0

      Directory structure is not being preserved, the files are being created with their original path prepended to the file name, for instance:
      File structure on master node:

      • workspace
        • folder1
          • folderA
            • fileA
          • fileB
        • folder2
          • fileC
        • fileD

      Files to copy: folder1, folder2 (or "folder1/*, folder2/", "/folder1/, /folder2/*", etc. All had the same result)
      Paths are relative to: This job's workspace on the master (not advised)
      No excluded files, flatten directories and ant default excludes both unchecked.

      File structure on slave node:

      • workspace
        • job_name
          • folder1/folderA/fileA
          • folder1/fileB
          • folder2/fileC

      I'm also using this plugin http://wiki.jenkins-ci.org/display/JENKINS/Clone+Workspace+SCM+Plugin with this job, not sure if this is causing this issue.

      PS: This is my first time opening an issue, and I was not sure if I should mark this issue as blocker or major.

          [JENKINS-10798] Directory structure is not being preserved

          Fabio Sobral added a comment -

          Edited to format the file structure using bullets.

          Fabio Sobral added a comment - Edited to format the file structure using bullets.

          Romain Seguy added a comment -

          I'll take a look when I'm back from holidays.

          Romain Seguy added a comment - I'll take a look when I'm back from holidays.

          Romain Seguy added a comment - - edited

          I'm not sure to understand. Do you mean that the name of the file is "folder1/folderA/fileA", including the / character?
          Can you give a try with "folder1/**/*,folder2/**/*" please?

          Romain Seguy added a comment - - edited I'm not sure to understand. Do you mean that the name of the file is "folder1/folderA/fileA", including the / character? Can you give a try with "folder1/**/*,folder2/**/*" please?

          Fabio Sobral added a comment -

          I tried "folder1/*/,folder2/*/" but got the same result. However, I just noticed the files created use \ instead of /.
          So the output actually looks like this:

          • workspace
            • job_name
              • folder1\folderA\fileA
              • folder1\fileB
              • folder2\fileC

          I'm not sure to understand. Do you mean that the name of the file is "folder1/folderA/fileA", including the / character?
          Yup, that's right, except for the path separator character that I got wrong last time. It uses \ and not /.

          Some more info about my environment:

          The master node is running Windows 7, slave is running Linux Ubuntu 8.10.

          The first task executed clones two git repositories and sets up the workspace for the build. It then starts two other tasks. Both tasks use the same workspace as the first one, which is shared using Clone Workspace SCM Plugin.
          One of these two tasks is configured to run only on the Linux slave node, and I'm trying to use copy-to-slave to copy the contents of the workspace in the master to the slave node.

          Fabio Sobral added a comment - I tried "folder1/* / ,folder2/* / " but got the same result. However, I just noticed the files created use \ instead of /. So the output actually looks like this: workspace job_name folder1\folderA\fileA folder1\fileB folder2\fileC I'm not sure to understand. Do you mean that the name of the file is "folder1/folderA/fileA", including the / character ? Yup, that's right, except for the path separator character that I got wrong last time. It uses \ and not /. Some more info about my environment: The master node is running Windows 7, slave is running Linux Ubuntu 8.10. The first task executed clones two git repositories and sets up the workspace for the build. It then starts two other tasks. Both tasks use the same workspace as the first one, which is shared using Clone Workspace SCM Plugin. One of these two tasks is configured to run only on the Linux slave node, and I'm trying to use copy-to-slave to copy the contents of the workspace in the master to the slave node.

          Fabio Sobral added a comment -

          Just noticed the text formatting is messing with some of the * characters in my previous posts.

          The paths I tried are:

           
          folder1/**, folder2/**
          /folder1/**, /folder2/**
          folder1/**/*,folder2/**/*
          

          Fabio Sobral added a comment - Just noticed the text formatting is messing with some of the * characters in my previous posts. The paths I tried are: folder1/**, folder2/** /folder1/**, /folder2/** folder1/**/*,folder2/**/*

          Fabio Sobral added a comment -

          Did you find anything about this issue? Is there anything I can do to help?
          I don't mean to sound pushy, just wanna make sure I'm giving you enough info to work on.

          Fabio Sobral added a comment - Did you find anything about this issue? Is there anything I can do to help? I don't mean to sound pushy, just wanna make sure I'm giving you enough info to work on.

            danielpetisme Daniel Petisme
            flsobral Fabio Sobral
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: