rundeck-plugins / rundeck-winrm-plugin

UNMAINTAINED - Rundeck WinRM Node Executor plugin
Other
56 stars 28 forks source link

file-copier recursive file copy not possible #77

Open pts-aut opened 2 years ago

pts-aut commented 2 years ago

I've defined a Job-Step to copy all directories an files in a specific path on the rundeck server. Parameter Recursive: true and Pattern is null. In the Rundeck-part of the call the CopyFileNodeStepPlugin.java is called correct - and after the output of the line: Begin copy 4096 bytes to node xxxxxxx: /home/rundeck/scripts/windows -> c:/temp/xxx/96257/ the call is forwarded to file-copier:overthere-winrm. Then the following error occurs:

failed: /home/rundeck/automatics/scripts/windows (Is a directory)
Failed: CopyFileFailed: com.dtolabs.rundeck.core.execution.service.FileCopierException: /home/rundeck/automatics/scripts/windows (Is a directory)

The same setting for Linux (with scp) is working without any error:

Begin copy 4096 bytes to node xxxxxxx: /home/rundeck/scripts/linux -> /tmp/xxx/96277/
Copied: /tmp/xxx/96277/

I think the Implementation in the file-copier of overthere-winrm does not handle recursive-copy for directories correctly.

Job-Configuration:

Node Configuration: "hostname": "xxxxxxx", "osName": "Windows", "osVersion": null, "osFamily": "Windows", "node-executor": "overthere-winrm", "file-copier": "overthere-winrm", "file-copy-destination-dir": "c:/temp/xxx", "winrm-protocol": "http", "winrm-port": 5985, "winrm-cmd": "powershell", "winrm-auth-type": "ntlm", "winrm-password-storage-path": "keys/winrm/xxx.password"