Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implementation of BitBucket Server third-party webhook plugin Post Web Hooks resolves #651. Embedded wiki files have been updated to reflect the change. As part of the implementation, this fixes #650 to avoid additional scans by handling the MERGED event.
As part of the customer's deployment, they needed to have the ability to use multiple instances of BitBucket server to test the configuration and workflow before using it in their production instance. As such, this resolves #674 with changes that allow for multiple BitBucket servers. The implementation may need some work given when looking at the multi-SCM feature, it was written to accommodate GitHub/GitLab type configurations where there is a URL for the SCM and a URL for the API. Since BitBucket uses one URL for the SCM and an additional "api-path" configuration, the "optional-instances" clause is configured differently to make multi-SCM with BBS work.
UPDATE: Also resolves #699 out of necessity for deployment.
Testing
Multi-SCM testing was done with a BB Server as the primary instance, a BB Server, and BB Cloud as secondary instances. Issue #675 will remain open until testing is performed with BB Cloud as the primary SCM with one or more BB Servers as secondary.
Currently, it is deployed and functional at a customer site with their production BB Server as the primary and their sandbox BB Server as the secondary.
The Post Web Hook plugin was also tested locally using BB Server and is in the customer's environment. Locally I validated that Post Web Hook events and BB Server native events were handled with no changes from the handling of the BB Server native events.
Post Web Hook global events are configured in the customer's sandbox and are being used in combination with config-as-code to provide override configurations on a per-repository basis. Per-repository Post Web Hook events were tested in my local setup. The customer has native BB Server events coming from their production instance, so CxFlow is handling both without issue.
Tested issue #699 with both Jira Data Center and Jira Cloud.
Author - Nathan Leach
Checklist