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

Filesystem SCM can't checkout on remote machine

    Details

    • Similar Issues:

      Description

      I have a single repo with multiple projects in it. In order to check out only once the big repo and then subsequently check out smaller parts of the big repo i use the filesystem scm-plugin.

       

      When my jobs stay on the master everything works fine. When moving jobs ( and the checkout) to a slave with a job like this:

       

      def fileSCM = filesystem(clearWorkspace: false, copyHidden: false, path: 'c:\\hudson\\jobs\\UFM6-git\\jobs\\UFM6_Multibranch\\branches\\WindowsExecu.2a1m4b.ble-Firmware\\workspace\\ufm\\webHMI') // Path to folder on Master
      
      node('buildserver-2'){ // buildserver-2 is a Jenkins slave 
        stage('Checkout '){ checkout fileSCM }
      }
      

      I get the following printout:
      Running on buildserver-2 in c:\jenkins\workspace\UFM6-git\BRANCH_WindowsExecutable_Firmware\HMI
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Checkout )
      [Pipeline] checkout
      FSSCM.checkout c:\hudson\jobs\UFM6-git\jobs\UFM6_Multibranch\branches\WindowsExecu.2a1m4b.ble-Firmware\workspace\ufm\webHMI to c:\jenkins\workspace\UFM6-git\BRANCH_WindowsExecutable_Firmware\HMI
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.lang.IllegalArgumentException: Parameter 'directory' is not a directory
      at org.apache.commons.io.FileUtils.validateListFilesParameters(FileUtils.java:545)
      at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:521)
      at org.apache.commons.io.FileUtils.iterateFiles(FileUtils.java:628)
      at hudson.plugins.filesystem_scm.FolderDiff.getNewOrModifiedFiles(FolderDiff.java:116)
      at hudson.plugins.filesystem_scm.RemoteFolderDiff$CheckOut.invoke(RemoteFolderDiff.java:95)
      at hudson.plugins.filesystem_scm.RemoteFolderDiff$CheckOut.invoke(RemoteFolderDiff.java:88)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2739)
      at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:336)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:94)
      at java.lang.Thread.run(Unknown Source)
      at ......remote call to JNLP4-connect connection from buildserver-2.audi.audi/192.168.0.163:54478(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      at hudson.remoting.Channel.call(Channel.java:830)
      at hudson.FilePath.act(FilePath.java:986)
      at hudson.FilePath.act(FilePath.java:975)
      at hudson.plugins.filesystem_scm.FSSCM.checkout(FSSCM.java:194)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      at hudson.security.ACL.impersonate(ACL.java:260)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
       

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Does the directory exist on the agent?
            I'd guess "no". It probably makes sense to add a "copy from master" mode to SCM settings, but so far it will read the files from the agent IIRC

            Show
            oleg_nenashev Oleg Nenashev added a comment - Does the directory exist on the agent? I'd guess "no". It probably makes sense to add a "copy from master" mode to SCM settings, but so far it will read the files from the agent IIRC
            Hide
            genmad Jens Rogalli added a comment -

            I don't think copy from master is the right solution. When creating something on a slave and then moving it with filesscm to another slave, this wouldn't be covered.

            I learned the hard way the difference between file and Filepath therefore my idea of when creating the file scm in the right surrounding couldn't Jenkins copy those files automatically?

            I looked at the code and saw that the path Is saved as String. When creating the FSSCM and creating a Filepath object instead, with the correct channel, then shouldn't it be working out of the box (except for exchanging File for Filepath all over the place)?

             

             

            Show
            genmad Jens Rogalli added a comment - I don't think copy from master is the right solution. When creating something on a slave and then moving it with filesscm to another slave, this wouldn't be covered. I learned the hard way the difference between file and Filepath therefore my idea of when creating the file scm in the right surrounding couldn't Jenkins copy those files automatically? I looked at the code and saw that the path Is saved as String. When creating the FSSCM and creating a Filepath object instead, with the correct channel, then shouldn't it be working out of the box (except for exchanging File for Filepath all over the place)?    

              People

              • Assignee:
                oleg_nenashev Oleg Nenashev
                Reporter:
                genmad Jens Rogalli
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: