Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

nfalco79
Copy link
Member

@nfalco79 nfalco79 commented Nov 8, 2024

Adds an option to the Status Notification Trait to guide what notification to send to Bitbucket when the Jenkins build result is ABORTED.

This PR restores the default behavior for the NOT_BUILT notification from SUCCESS to FAILED (configurable to STOPPED) for Bitbucket Cloud; the SUCCESS state was incorrectly introduced in 2022 as the default instead of STOPPED when the disableNotificationForNotBuildJob configuration option was added (the name can be misinterpreted).

Adds missing guidance description for each configurable option in the Build Status Notification Trait.

Status Notification Summary

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 FAILED or STOPPED configurable FAILED or CANCELLED
ABORTED configurable FAILED or STOPPED configurable FAILED or CANCELLED
null INPROGRESS INPROGRESS

The STOPPED status prevents merge checks on Cloud
CANCELLED status should prevents merge checks on Data Center

@nfalco79 nfalco79 force-pushed the feature/cancelled_status branch 5 times, most recently from 707430f to 29a314b Compare November 9, 2024 13:32
@nfalco79 nfalco79 marked this pull request as ready for review November 9, 2024 13:49
@nfalco79
Copy link
Member Author

Manual test OK

@nfalco79 nfalco79 force-pushed the feature/cancelled_status branch 2 times, most recently from 7618760 to 86daff6 Compare November 14, 2024 09:47
Add an options to BitbucketBuildStatusNotificationsTrait to determine which notification to send to Bitbucket based on the Jenkins build result.
Revert the default behaviour for NOT_BUILT notification from SUCCESS to FAILED (configurable to STOPPED) for Bitbucket Cloud, the SUCCESS status was erroneously introduced in 2022 as default instead of STOPPED with the disableNotificationForNotBuildJob (which can be misunderstood) configurable option.
Add help description for all current configurable options for the build status notification trait
@nfalco79 nfalco79 force-pushed the feature/cancelled_status branch from 86daff6 to 07aaebd Compare November 14, 2024 10:21
@nfalco79 nfalco79 merged commit 200b56c into master Nov 14, 2024
19 checks passed
@nfalco79 nfalco79 deleted the feature/cancelled_status branch November 14, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant