I am using Atlasssian Bamboo version 5.0 build 3715 - 11 Jul 13. I tried adding scp task to my build plan in order to transfer some build artifacts to a remote server. When trying to transfer multiple files (by comma separated list or by ant pattern or the whole directory), I encounter this exception:
net.schmizz.sshj.xfer.scp.SCPException: EOF while expecting response to protocol message
However If I add separate scp task for each file, there is no problem.
I tried to transfer the same files using my local scp client and my local scp client can transfer them to the remote with no problem. I tried with different set of files. Only once bamboo scp plugin could send multiple files. Does anybody know whats the problem?
Hello Arif,
Thank you for your question.
I would kindly suggest you the following:
please, add a Script task as per following:
# on Linux echo "foo" > foo.txt echo "bar" > bar.txt mkdir directory echo "foo" > directory/foo.txt echo "bar" > directory/bar.txt
# on Windows echo "foo" > foo.txt echo "bar" > bar.txt md directory echo "foo" > directory/foo.txt echo "bar" > directory/bar.txt
please, add a SCP task as per following:
Local Path*: foo.txt,bar.txt,directory/foo.txt,directory/bar.txt Remote Path: /path/to/remote/server [ ] Use Ant patterns to select files
As a result, you would have the following in the build log and the files copied to the "Remote Path" provided.
... simple 01-Jan-2015 12:50:49 Finished task 'Script' simple 01-Jan-2015 12:50:49 Starting task 'SCP Task' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask' simple 01-Jan-2015 12:50:50 Performing a recursive copy... simple 01-Jan-2015 12:50:50 Uploading 'bar.txt'... simple 01-Jan-2015 12:50:50 Creating remote directory 'directory'... simple 01-Jan-2015 12:50:50 Creating remote directory 'directory'... simple 01-Jan-2015 12:50:50 Uploading 'foo.txt'... simple 01-Jan-2015 12:50:50 Uploading '<bamboo-home>/xml-data/build-dir/PROJ-SCP-JOB1/bar.txt'... simple 01-Jan-2015 12:50:50 '<bamboo-home>/xml-data/build-dir/PROJ-SCP-JOB1/bar.txt' was uploaded successfully. simple 01-Jan-2015 12:50:50 Uploading '<bamboo-home>/xml-data/build-dir/PROJ-SCP-JOB1/directory'... simple 01-Jan-2015 12:50:50 Uploading 'directory/bar.txt'... simple 01-Jan-2015 12:50:50 Uploading 'directory/foo.txt'... simple 01-Jan-2015 12:50:50 '<bamboo-home>/xml-data/build-dir/PROJ-SCP-JOB1/directory' was uploaded successfully. simple 01-Jan-2015 12:50:50 Uploading '<bamboo-home>/xml-data/build-dir/PROJ-SCP-JOB1/foo.txt'... simple 01-Jan-2015 12:50:50 '<bamboo-home>/xml-data/build-dir/PROJ-SCP-JOB1/foo.txt' was uploaded successfully. simple 01-Jan-2015 12:50:50 Finished task 'SCP Task' ...
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
Is there any way to accomplish this without listing all my files followed by a comma? I would like to copy the folder's contents without having to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David, In 'Local Path', please use: **/* (it will copy everything) foo/* (it will copy everything from 'foo')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David, Please, be aware of the following https://jira.atlassian.com/browse/BAM-14439
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.