Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can Bamboo SCP task copy from remote server to local machine?

Steven Tran March 16, 2015

Hi,

In Bamboo's SCP Task Configuration, I can set the task up to copy files from a local path to the remote server. However is going in the opposite direction possible? I would like to copy a file from the remote server to the Bamboo machine's local path.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Franz Holzer February 5, 2017

i still wonder why the Bamboo SCP/SSH Task cant do both, copy to server and copy from server.
would be such an easy task ..... 

1 vote
Radek Antoniuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2015

Hi Steven,

Yes, it is possible. You can use a Script task and write the command line as usual:

/usr/bin/scp some.remote.host.com:/path/to/source_file.tar bamboo_server_hostname:/path/to/target_filename.tar

For this to work, you need to generate SSH key on the source_host and put the id_rsa.pub contents into .ssh/authorized_keys on the bamboo_server_hostname for the SSH Public Key Authentication to work.

You might also find Bamboo+variables useful for some variables or paths, e.g. ${bamboo.build.working.directory}

 

Regards,

Radek 

homeniuk March 19, 2015

Are you sure that this is the right way? For example, if I run PHPUnit test on the remote agent, and would like to view the results (based on the result.xml) in Bamboo I have to manually copy this files back to bamboo?

Franz Holzer February 5, 2017

yes, since there is no otherway for that :/ and its 2017 now

S September 2, 2018

2018 now. :)

 

Yeah, it's really dumb that the SCP task is so limited. It can also be very fiddly using the SSH task to do this if you were relying on password authentication for the copy.

TAGS
AUG Leaders

Atlassian Community Events