Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Build status not appearing in pull request

Gopinath D
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 31, 2021

Hi All,

I have been integrated Jenkin with Bitbucket for my application. 

In Jenkin side, I have added the configuration in "Build with BitBucket Push and Pull Request Plugin" Triggers while create and update.

In Bitbucket Cloud, I have added a web hook  for JenkinUrl/bitbucket-ppr-hook, for triggering.

It works fine and I use to get build status (green tick or red cross) in every pull request raised or updated with new changes.

Now, for no reason, this status stopped showing and I didn't do any configuration changes from my end.

Any licensing issue ? Need to be in any specific plans ?

Can you please help on identifying the issue and fix it.

 

Thanks,

Gopi

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 3, 2022

Hi Gopi,

I'd like to ask a few questions so we can better help you:

1. Does a build get triggered in Jenkins, when an event specified in the Triggers of this webhook occurs?
I'm just trying to understand if the webhook does not get triggered at all, or if it does and it's just the status that is not showing.

2. If you open the Commits page of this repo on Bitbucket website, do you see a build status there for the commits of the PR's source branch (assuming that the builds get triggered)?

3. Do you see any statuses listed if you run the following API call for one of the affected PRs?

curl -u <Bitbucket_username>:<app-password> https://api.bitbucket.org/2.0/repositories/<workspace-id>/<repo-slug>/pullrequests/<pr-id>/statuses

where
<Bitbucket_username> your Bitbucket username
<app-password> either your Atlassian account's password or an app-password
<workspace-id> the workspace id of the workspace that contains this repo
<repo-slug> the repository's slug
<pr-id> the id of the PR, which you can find in the URL of the PR when you open it on Bitbucket website

Kind regards,
Theodora

Nathan Phillip Brink
Contributor
January 28, 2026

What I have seen is that Bitbucket’s PR GUI checks the number of successful builds in the source branch when checking if merge checks have passed. I.e., one way to get Bitbucket to show successful builds on the PR is to simply set up CI on the source branch’s repository.

Bitbucket doesn’t have a way to store PR-specific builds. Note that PR-specific builds should be based on the result of merging the PR source branch into the PR target branch’s current revision. These builds should be invalidated/retriggered when the PR target branch’s current revision changes because the merge results will be different.

If you don’t have CI set up on the source repository or if the CI configured on the source repository isn’t “trustworthy” or the source repository is not the same repository as the target repository, then CI systems have trouble setting the build results. This is because setting build results requires access to the source repository. Normally, a CI would only have access to update the build results of the target repository.

You can see this exact issue with AppVeyor’s Bitbucket PR support. If you do a PR between two branches on the same repository, AppVeyor will do a build both for the commit to the source branch and another build for the PR once that is created. Bitbucket will do a build of the source branch itself when building the commits to the source branch. But Bitbucket will build the results of performing `git checkout «target branch» && git merge «source commit»`. But the PR build from AppVeyor will overwrite the original build created for the source branch. This doesn’t make any sense. Atlassian should provide APIs and data structures which allow those builds to be tracked separately. I want to go so far as to even say that Atlassian’s merge build checks feature should have an option to require CI builds to be from the PR instead of even considering CI builds of the PR’s source branch.

And if you do a PR between branches on different repositories, AppVeyor does the builds but they never show up in Bitbucket at all. This seems to be Bitbucket’s fault.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events