Afternoon,
I'm trying to use the bamboo SCP Task to deploy a checked out version of my app (Node) from bitbucket onto a remote amazon cloud server.
I have set up 3 plans. One to shutdown the app and another to bring it back up. These two both use the ssh task's and work flawlessly.
My 3rd plan for deployment has a number of tasks:
The job actually runs successfully however looking at the server the app has not reached the designated folder, or anywhere else as far as I can see.
We use key without passphrase for authentication and I'm using the same file as used for the SSH tasks mentioned above.
In the logs I have added a simple "ls dir" script inbetween the checkout and the SCP task to confirm that the code has actually been checked out (This step was to also ensure I was entering the right folder in the 'Local path' field). Sure enough this brings back a list of files I'd expect to be brought back.
Here's a snippet from the logs to show it does hit the task but doesn't seem to do anything:
simple 06-Jul-2013 10:16:12 Starting task 'Print Contents' of type
.....
build 06-Jul-2013 10:16:12 config.json build 06-Jul-2013 10:16:12 initproject.bat build 06-Jul-2013 10:16:12 Makefile build 06-Jul-2013 10:16:12 models build 06-Jul-2013 10:16:12 package.json build 06-Jul-2013 10:16:12 server.js build 06-Jul-2013 10:16:12 static build 06-Jul-2013 10:16:12 test build 06-Jul-2013 10:16:12 views
simple 06-Jul-2013 10:16:12 Finished task 'Print Contents' simple 06-Jul-2013 10:16:12 Starting task 'Copy files to the server' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask' simple 06-Jul-2013 10:16:13 Finished task 'Copy files to the server'
Spent over a day now messing about with it and can't seem to get anywhere with it.
P.S I've also tried messing with git archive through the SSH tasks but can't seem to get this to work either as I'm unable to pass the key in directly to the command. Obviously on a local machine I can ref the key file but on the elastic instances I have nowhere to keep it.
As a last resort I've thought about checking the key in to the actual app, as I could reference it to do scp using the script interface (I tried using the script tasks instead but it failed due to a key needing to be provided, it did appear to have at least tried though as I received this information on the logs, unlike the official task). I don't really want to go down this route and can envisage security peeps having a field day.
Any suggestions would be greatly appreciated.
Thanks,
Gary
Hi Gary,
We have some issues with SCP task. Please put your SCP action inside a shell script and run it as a script task.
Cheers,
Lucas Lima
Hi Lucas,
Thanks for your response, much appreciated.
In that case could you suggest how to use a rsa certificate from within the script? Is it possible to store it in Bamboo anywhere?
Thanks,
Gary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you ever figure this out? It seems a little crazy that this is so difficult. Its kind of the whole point of using bamboo for us right now. Ive tried "SCP tasks" and "scripts" with the same non encrypted ssh key issues of not being able to speciy it in the command line and it not working in the scp copy operation (it makes just the one base directory).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you figure this out? I am trying to use an SCP task to deploy a JAR file and I am getting a timeout exception.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.