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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Deny PR on Bitbucket Cloud if build fails on self hosted Bamboo

On my work team we are thinking about the possibility of deny a PR if the build for it fails. I have been searching on Internet but I can't find how to achieve the following goals:
- Fully integrate a bamboo server with repositories on bitbucket cloud with ssh keys. At this moment I can see the comments and commits on bamboo builds, but I can't see the build status on bitbucket cloud for the commits.
- Create rules for PR on failing tests, deny the PR.

I found at Bitbucket repository configuration the "Links" section, indeed there is an option that says "bamboo", but it asks me for a "link url" and "link key", I put my bamboo server URL but it doesn't accept it, also I can't find documentation about those values.

Any advice on this? Thanks in advance.

1 answer

0 votes

Hello @Roberto_De_Oliveira,

- Fully integrate a bamboo server with repositories on bitbucket cloud with ssh keys. At this moment I can see the comments and commits on bamboo builds, but I can't see the build status on bitbucket cloud for the commits.

In general this scenario happens when the Bamboo instance is not reachable from Bitbucket cloud, which means that your Bamboo instance is not accessible through the internet.

These are configuration steps:

  1. make sure your Bamboo is reachable from the internet.
  2. create a repository in Bamboo using the type Bitbucket cloud.
    The configuration will request your user credentials to browse the repositories. Once you select the repository you should be able to set the access though SSH.
  3. add a repository polling trigger or configure the trigger using webhooks (Triggering a Bamboo build from Bitbucket Cloud using Webhooks).
  4. configure the Bamboo branch management to use Pull Requests.
  5. create a pull request and check if the build was triggered.
  6. when the build is finished, check if the status was updated for the pull request on Bitbucket cloud.

- Create rules for PR on failing tests, deny the PR.

There is no automation for this in Bitbucket cloud, but you could try implementing your own using our APIs (Bitbucket API - Pull request)

I hope it helps!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

595 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you