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

Branch Restrictions allowing Bamboo Repository Commits

Curtis November 2, 2021

We are currently running Bitbucket Server along with Bamboo. I am looking to have Bamboo upon a successful deployment, perform a commit to the release branch in the repository. We use Bitbucket's Branch permissions to prevent rewriting history and deletion, and changes only through Pull Request. You can add a user as an exception, but I don't see the user Bamboo uses (Atlassian Bamboo) as an option to select as an exception user.

Bamboo uses Crowd for authentication which connects to AD to get our users that can authenticate.

The setup in the Bamboo Plan is using the Repository commit task to perform the commit and push the changes to Bitbucket. Bamboo and Bitbucket are linked, via the standard Atlassian method and the repository is a Linked Repository in Bamboo.

What are your best ideas on how to either get the Bamboo user to be added as an exception? Or a better way to go about performing the commit? Or any other solution that I'm not seeing.

1 answer

1 accepted

0 votes
Answer accepted
Curtis November 2, 2021

The desired feature is already supported and built into Bitbucket and Bamboo. Bamboo upon linking to a Bitbucket repository, automatically creates and adds an access key into the repository in Bitbucket. In viewing the Linked Repository I saw the key and knew it was then existing in the matching Bitbucket repo.

Upon doing some web searching, I found this article, which shows a key being added directly to the branch permissions.

I had numerous times typed bamboo into the field, but the key had never shown up. When Bamboo creates keys, it gives them the name of Bamboo's URL. The filtering did not work to match anything in the URL other than the start of the name, with is http.

Knowing this, I was able to add the access key Bamboo created to the repository, and can grant only Bamboo access to make changes to a release branch without a Pull Request.

Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 2, 2021

Awesome - thanks for sharing your solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events