bitbucket-branch-source-plugin
bitbucket-branch-source-plugin copied to clipboard
Option to disable bitbucket notifications on aborted jobs
This PR adds an option to disable notifications for aborted Jobs. When the option: "Do not communicate aborted jobs to Bitbucket" is enabled in "Bitbucket build status notifications" configuration in Branch Sources, notification is ignored for aborted jobs.
My use case is that we are aborting some branch builds in multibranch pipelines for certain internal conditions, typically leaving only PR builds to finish successfully. Bitbucket shows all Jobs, including aborted ones, and shows them as failed. It is misleading for many bitbucket users, as it is not actual failure - just expected abort.
Similar request was discussed here (to mark them as Cancelled): https://github.com/jenkinsci/bitbucket-branch-source-plugin/issues/606 however as I understand, it won't be implemented.
Your checklist for this pull request
- [x] Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or in Jenkins JIRA
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Did you provide a test-case? That demonstrates feature works or fixes the issue.
Why was this PR closed without merging?
The following option: "Do not communicate aborted jobs to Bitbucket" is added to Bitbucket build status notifications configuration in Branch Sources configuration:
When the option is enabled and build is aborted, notification is skipped.
Superseded by #906