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

PRs display non-latest builds.

vladyslav_daniliants December 29, 2021

Hello all!


Short descriptions:
I have a problem with displaying the latest Jenkins builds on the Bitbucket Cloud PR pages - sometimes Bitbucket displays non-last build (e.g. latest build is #5, but bitbucket displays #3).


System description:
The project I'm working on is located on Bitbucket Cloud (bitbucket.org).
The project builds are done using self-hosted Jenkins.
Communication between BB and Jenkins is done using Bitbucket Branch Source Plugin (ver: 734.v2f848c5e6ea2). Also, there is  Bitbucket Pipeline for Blue Ocean plugin installed (not sure, if that matters).

One more thing.
During Jenkins build, Jenkins Pipeline code adds one more build object to a PR - it is used to display if a PR has the latest base branch merged in.
It is done via BB API.
So the PR has two different builds displayed at once.

Long description of the problem:
The problem occurs not for all builds and I don't see any regularity in it...
When a non-first (e.g. there already were builds for a PR) build is done on Jenkins, Bitbucket might display a link to a previous build.

In addition, we have slack notifications set for build results and they also show strange things.
The notifications are sent using the Bitbucket Cloud app.
Sometimes, when a build is done on Jenkins, a notification is sent to Slack, but that notification contains info about some old/previous build

 

Example

A PR has 5 Jenkins builds and a few commits.
However, Bitbucket displayed results of build #3 (failed one), instead of build number #5 (a successful one)
bb_worng_build_displayed.pngJenkins_all_builds.png

2 comments

vladyslav_daniliants December 30, 2021

Removing the second build (the one that indicates a version of a base branch) did not resolve the problem.

vladyslav_daniliants January 10, 2022

It appeared that the problem was in a backup Jenkins instance being (by coincidence/mistake) executed on another machine (simultaneously with the main Jenkins instance).

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events