bitbucket-branch-source-plugin icon indicating copy to clipboard operation
bitbucket-branch-source-plugin copied to clipboard

Use CANCELLED build state in Bitbucket Data Center and Server 8.0

Open KalleOlaviNiemitalo opened this issue 3 years ago • 1 comments

What feature do you want to see added?

Bitbucket Data Center and Server 8.0 support two new build states: UNKNOWN and CANCELLED. Please map the Jenkins ABORTED result to CANCELLED when the on-premises Bitbucket software is sufficiently new.

Bitbucket Branch Source 751.vda_24678a_f781 maps the results as follows:

Jenkins Bitbucket Cloud Bitbucket Data Center and Server
SUCCESS SUCCESSFUL SUCCESSFUL
UNSTABLE configurable SUCCESSFUL or FAILED configurable SUCCESSFUL or FAILED
FAILURE FAILED FAILED
NOT_BUILT configurable SUCCESSFUL or STOPPED configurable SUCCESSFUL or nothing 👈
ABORTED FAILED FAILED 👈
null INPROGRESS INPROGRESS

CANCELLED would be suitable for the ABORTED result, and perhaps also for NOT_BUILT.

UNKNOWN does not look suitable for any result.

Upstream changes

[BSERV-3219] Add 'Canceled' state for Build Statuses

KalleOlaviNiemitalo avatar Jun 02 '22 09:06 KalleOlaviNiemitalo

According to The Bitbucket Cloud REST API, the CANCELLED and UNKNOWN build states have not been added to Bitbucket Cloud. There, the valid values are SUCCESSFUL, FAILED, INPROGRESS, and STOPPED. The plugin already uses all of those. So, the behavior with Bitbucket Cloud should not be changed.

KalleOlaviNiemitalo avatar Jun 02 '22 15:06 KalleOlaviNiemitalo