its been a pretty frustrating few days trying to get this working. I want to deploy to heroku via a git push. This works fine if I push the code logged into the linux server with my account but not via bamboo I suspect this is because bamboo is running as root. Also if I run bamboo with ./start-bamboo.sh logged in as that user my deploy works as expected. The problem is trying to get the linux service to run as the bamboo user. I have followed atlassians guide on running bamboo as a linux service. The init.d script they provide doesn't seem to work at all. Bamboo never starts up. Then I tried copying how JIRA does it. So basically copy the JIRA init.d script that the JIRA installer created (the installers for JIRA and stash are a life saver) this is a very simple script, obviously I update it to point to my bamboo install and not JIRA but it works great. Unfortunately that still runs as root. So I also made some minor changes to the start-bamboo.sh script in the /opt/bamboo/bin install dir. as such
JIRA_USER="bamboo"
echo executing using dedicated user: $JIRA_USER
if [ -x "/sbin/runuser" ]; then
sucmd="/sbin/runuser"
else
sucmd="su"
fi
if [ "$PRGRUNMODE" == "true" ] ; then
$sucmd -m $JIRA_USER -c "$PRGDIR/catalina.sh run $@"
else
$sucmd -m $JIRA_USER -c "$PRGDIR/startup.sh $@"
fi
This SEEMS to work tomcat starts according to the output. However when I do this bamboo NEVER responds and I get no log details.
Has someone successfully configured their bamboo service to run under a different user?