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

Directory structure is not being preserved

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: copy-to-slave-plugin
    • Labels:
      None
    • Environment:
      Master: Windows 7, Jenkins 1.425, copy-to-slave 1.3
      Slave: Linux Ubuntu 8.1.0
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          flsobral Fabio Sobral added a comment -

          Edited to format the file structure using bullets.

          Show
          flsobral Fabio Sobral added a comment - Edited to format the file structure using bullets.
          Hide
          rseguy Romain Seguy added a comment -

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

          Show
          rseguy Romain Seguy added a comment - I'll take a look when I'm back from holidays.
          Hide
          rseguy 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?

          Show
          rseguy 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?
          Hide
          flsobral 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.

          Show
          flsobral 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.
          Hide
          flsobral 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/**/*
          
          Show
          flsobral 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/**/*
          Hide
          flsobral 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.

          Show
          flsobral 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.

            People

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

              Dates

              • Created:
                Updated: