• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • ssh-steps-plugin
    • None

      Hi,

      Im trying to copy a remote directory using ssh-steps plugin. when i run it says 

      4: not supported to get directory /home/jenkins/app-performance/target/gatling at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:930) at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:892) at com.jcraft.jsch.ChannelSftp$get.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141) at org.hidetake.groovy.ssh.operation.SftpOperations$_getFile_closure1.doCall(SftpOperations.groovy:39) at org.hidetake.groovy.ssh.operation.SftpOperations$_getFile_closure1.doCall(SftpOperations.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)

       

      my pipeline code is

        

      stage('Download report'){

          steps{

             script{

      {{ sshGet remote: remote, from: "app-performance/target/gatling" , into: "${env.WORKSPACE}/app-performance/"}}

                   }

               }

      {{ }}}

       is there a way to use sshGet to download a remote directory ?

       

      {{}}

          [JENKINS-65704] sshGet not supported to get directory

          The following works for me:

          dir("app-performance/") {
            sshGet remote: remote, from: "app-performance/target/gatling/", filterRegex: /.*/, into: ".", override: true
          }

          This will create the sub- folder "gatling" in "app-performance"

          Christoph Vogtländer added a comment - The following works for me: dir( "app-performance/" ) { sshGet remote: remote, from: "app-performance/target/gatling/" , filterRegex: /.*/, into: "." , override: true } This will create the sub- folder "gatling" in "app-performance"

          Tobias added a comment -

          Same Problem here. If i use the code abobve with filterregex i recieve the exact same error.

          Is there anyone that can successfully copy a folder from a remote host?

          Tobias added a comment - Same Problem here. If i use the code abobve with filterregex i recieve the exact same error. Is there anyone that can successfully copy a folder from a remote host?

            nrayapati Naresh Rayapati
            dilantha dilantha
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: