Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,573
Community Members
 
Community Events
168
Community Groups

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

Atlassian Community Events