Currently we launch the remote agent Bamboo process using a special "bamboo" user account. However, some people would like the ability to run builds as another user. Is it possible to set what account to use for a Bamboo build? If there isn't an out-of-box setting, has anyone ran into this and found a work around?
A simple workaround would be to launch your build manually from a script task. However, all Bamboo goodness (like parsing output for errors) will be unavailable then.
What I would suggest is to wrap your builder with a script and make Bamboo think it's a regular builder. The wrapper script should parse the builder arguments and detect which user should be used for building, filter out that user argument and run the builder using su or runas.
That covers the build. If you want to check out, it's trickier. You should be able to use a wrapper script technique with Git, Mercurial or Perforce, but you won't be able to pass the user argument to them and would have hardwire the correct user basing on the plan key (you can get that from the checkout directory name). Note that although for checkout the directory name will be human readable, for change detection the directory name will be incomprehensibly hashed ;-).
If you're using CVS or Subversion, you cannot do checkouts as a specific user unless you're using remote agents.
Speaking of remote agents, you can run them as any user, but all builds on that agent will use the same user, which is not what you want as far as I understand.
I'm John Allspaw, co-founder of Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...
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