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

Copying files that are outside the workspace dir to a slave does not work

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Only files that are directly located in the workspace folder of a project on the master
      can be copied to a slave's workspace. Specifying relative and absolute paths in the configuration
      text field has no effect (e.g. "../build.xml").
      The workspace folder also has to be created manually, which is not intuitive.

      Several people have reported the same issue on the Copy-To-Slave Plugin wiki page (http://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin).

      The reason for this behavior seems to lie in the FilePath.copyRecursiveTo() method. So this might rather be a core issue.

        Attachments

          Activity

          Hide
          rseguy Romain Seguy added a comment -

          I think I can solve this by doing the following:

          1. Add a new option (a checkbox) to specify that the setting is done with absolute paths;
          2. Add another option (still a checkbox which would be exclusive with the first one) to specify that the setting is done relatively to the job folder rather than the workspace folder.

          Your thoughts on this?

          Show
          rseguy Romain Seguy added a comment - I think I can solve this by doing the following: Add a new option (a checkbox) to specify that the setting is done with absolute paths; Add another option (still a checkbox which would be exclusive with the first one) to specify that the setting is done relatively to the job folder rather than the workspace folder. Your thoughts on this?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : rseguy
          Path:
          trunk/hudson/plugins/copy-to-slave/pom.xml
          trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToMasterNotifier.java
          trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper.java
          trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveUtils.java
          trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/config.jelly
          trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/config.properties
          trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/config_fr.properties
          trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/help-hudsonHomeRelative.html
          trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/help-hudsonHomeRelative_fr.html
          http://jenkins-ci.org/commit/36788
          Log:
          JENKINS-7021

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : rseguy Path: trunk/hudson/plugins/copy-to-slave/pom.xml trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToMasterNotifier.java trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper.java trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveUtils.java trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/config.jelly trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/config.properties trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/config_fr.properties trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/help-hudsonHomeRelative.html trunk/hudson/plugins/copy-to-slave/src/main/resources/com/michelin/cio/hudson/plugins/copytoslave/CopyToSlaveBuildWrapper/help-hudsonHomeRelative_fr.html http://jenkins-ci.org/commit/36788 Log: JENKINS-7021
          Hide
          rseguy Romain Seguy added a comment -

          So, I've fixed this adding a new "Specified paths are relative to HUDSON_HOME" checkbox to the build wrapper. This works fine.

          I still need to see how I can tweak the checkUrl associated to the includes and excludes fields so that it dynamically takes into account the state of the checkbox for the validation. For the moment it is:

          '/job/xx/'+'descriptorByName/com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper/checkIncludes'+qs(this).addThis().toString()
          

          Also, the "workspace" folder is automatically created when required.

          Show
          rseguy Romain Seguy added a comment - So, I've fixed this adding a new "Specified paths are relative to HUDSON_HOME " checkbox to the build wrapper. This works fine. I still need to see how I can tweak the checkUrl associated to the includes and excludes fields so that it dynamically takes into account the state of the checkbox for the validation. For the moment it is: '/job/xx/' + 'descriptorByName/com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper/checkIncludes' +qs( this ).addThis().toString() Also, the "workspace" folder is automatically created when required.
          Hide
          rseguy Romain Seguy added a comment -

          Validation now correctly takes into account the value of the checkbox.

          Show
          rseguy Romain Seguy added a comment - Validation now correctly takes into account the value of the checkbox.

            People

            • Assignee:
              rseguy Romain Seguy
              Reporter:
              fredg02 fredg02
            • Votes:
              5 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: