jenkinsci / bitbucket-branch-source-plugin

Bitbucket Branch Source Plugin
https://plugins.jenkins.io/cloudbees-bitbucket-branch-source
MIT License
216 stars 352 forks source link

Use CANCELLED build state in Bitbucket Data Center and Server 8.0 #606

Open KalleOlaviNiemitalo opened 2 years ago

KalleOlaviNiemitalo commented 2 years ago

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 commented 2 years ago

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.