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

It gets different workspace folder in master when copy back to master in post build.

    Details

    • Similar Issues:

      Description

      Hi,

      I get confused when I use custom workspace in Jenkins job but sometimes CopyToSlave plugin will get different file path in master, over destination folder is disabled. What's rule it follows? Or a bug? My slave is Windows and master is Linux.

      [copy-to-slave] Copying 'test/abc.xml', excluding nothing, from 'file:/C:/copytosalve/' on 'hudson.slaves.DumbSlave@13bc56cc' to 'file:/usr/local/apache-tomcat/bin/C:%5Ccopytosalve/' on the master.

      [copy-to-slave] Copying 'test/abc.xml', excluding nothing, from 'file:/C:/copytosalve/' on 'hudson.slaves.DumbSlave@b38fcee' to 'file:/root/C:%5Ccopytosalve' on the master.

      I checked the source code in https://svn.jenkins-ci.org/trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveUtils.java, the method is inherited from hudson.model.FreeStyleProject, is there any configuration need in the Jenkins server to get the unique default workspace folder when copy back to master?

      if(freeStyleProject.getCustomWorkspace() != null && freeStyleProject.getCustomWorkspace().length() > 0)

      { projectWorkspaceOnMaster = new FilePath(new File(freeStyleProject.getCustomWorkspace())); }

      else

      { projectWorkspaceOnMaster = new FilePath(new File(freeStyleProject.getRootDir(), "workspace")); }

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              danielpetisme Daniel Petisme
              Reporter:
              alanc Alan Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: