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

FSSCM does not work with “checkout scm” on agent

    Details

    • Similar Issues:

      Description

      Currently, it seems the FileSystem SCM plugin does not work in conjunction with the checkout scm command in a Pipeline script.

      Here's a simple test case:

      1. Have a Jenkins agent (f.k.a. slave), and tag it agent.
      2. Create a new Pipeline job and name it testjob, using the FSSCM plugin, and have this in the pipeline script (on the file system):
        pipeline {
            agent {
                label: 'agent'
            }
        
            stages {
                stage('checkout') {
                    steps {
                        dir('foobar') {
                            checkout scm
                        }
                    }
                }
            }
        }
        

      Expected result:

      1. Checkout works.

      Actual result:

      1. Checkout fails, with messages similar to this:
        [checkout] FSSCM.checkout /Users/johndoe/tmp/testrepo/ to /home/jenkins/jenkins/workspace/testjob/build-server
        [checkout] Failed in branch checkout
        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:2749)
        	at hudson.remoting.UserRequest.perform(UserRequest.java:210)
        	at hudson.remoting.UserRequest.perform(UserRequest.java:53)
        	at hudson.remoting.Request$2.run(Request.java:358)
        	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
        	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 hudson.remoting.Engine$1$1.run(Engine.java:94)
        	at java.lang.Thread.run(Thread.java:748)
        	at ......remote call to JNLP4-connect connection from 10.10.0.100/10.10.0.100:57529(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:987)
        	at hudson.FilePath.act(FilePath.java:976)
        	at hudson.plugins.filesystem_scm.FSSCM.checkout(FSSCM.java:194)
        	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
        	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
        	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
        	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$$$capture(FutureTask.java:266)
        	at java.util.concurrent.FutureTask.run(FutureTask.java)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        	at java.lang.Thread.run(Thread.java:745)
        Finished: FAILURE
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                znerd Ernst de Haan
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: