publish-over-ssh not moving back to root after each file transfer

1,334 views
Skip to first unread message

mike muldoon

unread,
Aug 12, 2015, 8:32:05 PM8/12/15
to Jenkins Users
Hello all,

When pushing a transfer set up, ssh is not traversing back to the root directory after each file transfer. It just keeps creating directories deeper and deeper until the filesystem can't handle the depth. To the logs:

SSH: Connecting from host [Jenkins]
SSH: Connecting with configuration [ftp.arglebargle.com] ...
SSH: Creating session: username [skooby], hostname [ftp.arglebargle.com], port [22]
SSH: Connecting session ... SSH: Connected SSH: Opening SFTP channel ... SSH: SFTP channel open SSH: Connecting SFTP channel ... SSH: Connected SSH: Remote root is not absolute, getting absolute directory from PWD SSH: cd [release-core/data/core/] SSH: OK SSH: mkdir [api] SSH: OK SSH: cd [api] SSH: OK SSH: put [Application.cfc] SSH: OK

At this point, the first file has been transferred to the correct location:
release-core/data/core/api/Application.cfc

The next file should be put here:
release-core/data/core/api/v1/controller.cfc

..but rather than doing a 'cd /' or equivalent, we just keep drilling:

SSH: mkdir [release-core]
SSH: OK
SSH: cd [release-core]
SSH: OK
SSH: mkdir [data]
SSH: OK
SSH: cd [data]
SSH: OK
SSH: mkdir [core]
SSH: OK
SSH: cd [core]
SSH: OK
SSH: mkdir [api]
SSH: OK
SSH: cd [api]
SSH: OK
SSH: mkdir [v1]
SSH: OK
SSH: cd [v1]
SSH: OK
SSH: put [controller.cfc]
SSH: OK
SSH: mkdir [release-core]
SSH: OK


My transfer set config:
Source files: **/
Remove prefix:
Remote directory: /release-core/data/core

Versions:
Publish over SSH version 1.13


Any ideas, fine folks?

Thanks!
Mike

mike muldoon

unread,
Aug 12, 2015, 9:06:55 PM8/12/15
to Jenkins Users
Fixed!

But not a satisfying fix. The ssh server transfer set config detailed below is part of a job definition, using a shared SSH Server config.

By moving 'release-core/data/core' from the job's 'Remote directory' setting to the global SSH Server's 'Remote Directory' setting, ssh now traverses back to the top level directory after each file is transferred, as desired:

SSH: cd [/release-core/data/core]
SSH: OK
SSH: mkdir [api]
SSH: OK
SSH: cd [api]
SSH: OK
SSH: put [Application.cfc]
SSH: OK

boom:
SSH: cd [/release-core/data/core]
SSH: OK
SSH: cd [api]
SSH: OK
SSH: mkdir [v1]
SSH: OK
SSH: cd [v1]
SSH: OK
SSH: put [controller.cfc]
SSH: OK

However, if I'm mis-configuring the job-level SSH Server settings, I would appreciate the clue.

Thanks!
Mike
Reply all
Reply to author
Forward
0 new messages