I am trying to do a simple deploy after I have completed a build. I am using an SCP Task to see if I can transfer a file to my remote server. The deploy says it completes successfully, but when I look at the log it says it can't find the file I want to transfer. I created a txt file in the local folder. I am guessing that my file path, relative to working directory is not correct, but cant seem to find what exactly my working directory is. Can someone please give me an example or point me in the correct direction? Thank you.
I can answer the "I can't figure out what my working directory is" component of your question...
add an entry to the environment variables section of the task. add something like:
and you will see in the log where it substitutes the value so that it can be assigned to TELLMENOW
Matt Wopata · 1 karma ·yesterday
Thank you. So now that I have my working directory(/home/bamboo/bamboo-agent-home/xml-data/build-dir/, I seem to be unable to access it. When I try to get to it in putty, i get an access denied. Any way around that?
So, what ID is currently running the bamboo agent? It appears to be 'bamboo' based on this description.
I get this feeling that the problem lies in the permissions of that user. It should be /home/bamboo/bamboo-agent-home/xml-data/build-dir/PROJKEY-PLANKEY-JOBKEY
The fact that it isn't that location makes me scratch my chin. That, and knowing you are getting an access denied in going to that location from an ssh session. It is possible that the execute bit has been turned off on the directory. That prevents search.
So yeah, I am curious, perhaps you can run a script task before the scp task, which does some diagnostics.....
ls -ld .
you don't have to share the results of hostname (for security reasons) or the id (if it doesnt match, and for the same reasons)... If it doesnt match, check to see if an admin (if it isnt you) can give permissions to that ID through its primary group specified through the 'id -a' command.
if 'ls -ld .' shows an issue in the execute bit or the write bit with respect to the user, get a chmod done to fix it. If the user running the agent happens to be 'bamboo' you can write a shell script task to do that with 'chmod u+rwx .'
And if there turns out to be no permissions issues... well... I would be very curious as to what else it could be, and why your working directory doesn't include the subdirectory for the job.
After further review, the issue had to do with the instance that we were trying to connect to not having Bamboo installed.
Before we started using Bamboo, we had already created and built an EC2 instance that contained our custom PHP server configuration. Since it wasn't one of Bamboo's default AMI's, it was difficult to connect it to the build server.
Moving foward we are either going to either
A. Create our own custom AMI that Bamboo can point to when it is creating its instances
B. Customize the default Bamboo AMI to have all the server-side features we need.
Here is some good documentation about custom AMI's: https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image
The reason I was unable to access the directory via SSH was because I was using "ec2-user@instance_id" instead of "root@instance_id". If you want to be able to acceess every folder, make sure you are connecting to your EC2 instance as the root user via SSH.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs