Maintenance and support for this plugin has now been taken over by Mohamicorp. Please use our issue tracker here to create any issues or support requests.
Bitbucket Server Webhook for Jenkins
After making commits to Bitbucket Server (previously known as Stash), notify Jenkins that a new build has been created.
- Git Plugin - Jenkins needs to have the Git Plugin installed in Jenkins and the Poll SCM option must be enabled
Once installed, follow these steps:
- Navigate to a repository in Bitbucket Server.
- Hit the Settings link
- In the left-navigation, hit the Hooks link
- For the Stash Webhook to Jenkins, click the Enable button.
- Enter the URL to your Jenkins instance
- Select the method that clone method that Jenkins is using (HTTP or SSH).
- If using HTTP, enter the username that Jenkins is using to clone your repository.
- Submit the form.
- Commit some code and watch it trigger a build!
- Check your log file for any exceptions
- Be sure you have polling turned on for your project in Jenkins (just enable it... the schedule can be empty)
- Verify that the URLs for your repository match in Jenkins and the webhook settings. They MUST be identical.
- Still stuck? Check out the this wiki page or open an issue
Rate the Plugin
If you found this plugin useful, please consider leaving us a rating on our Atlassian Marketplace listing. Thanks!
- Fix to XSRF bug in Trigger Button (thanks JonMR for the PR)
- Fix sha1 for test triggers and prevent sha1=null in URLs (thanks SuperTux88 for the PR)
- Updated support for Bitbucket Server (previously known as Stash)
- Fixed regression with branch parameter when using "Trigger Build" button on PR page
- Add option to disable trigger button on PR page
- Restored pull-request notification
- Make option to include/exclude branch information in Jenkins notification
- Added ability to not send commit hash in Jenkins notification
- Reverted pull-request notifications back to where it was before
- Added datacenter compatible flag
- Git Plugin version 2.0.2 or greater in Jenkins is highly recommended
- No longer requires polling to be enabled for the git repository in Jenkins setup (REVERTED)
- Added more metadata in webhook notification to Jenkins, including the sha1
- Allows "Trigger Build" button to trigger a build multiple times
Special shoutout to loa for his pull request, work, and patience
- Stash 3.0 support
- Added ability to whitelist or blacklist specific branches for triggering of Jenkins. (whitelist = branch HAS to be in list to trigger; blacklist = branch is IGNORED if in the list)
- Move Jenkins event notification off to its own thread pool to prevent Stash's event thread from blocking (thanks charleso for the pull request)
- Fixed compatibility issue with versions of Stash before 2.8 (thanks xuey90 for the pull request)
- Created more helpful error messages during testing of the webhook on the configuration screen.
- Fixed NPE that occurs when event has a null user. Was seen using the SVN Mirror plugin.
- Fixed bug in which notifications no longer were sent when pull request is merged
- Added button to Pull Request page to trigger a build. Note that Jenkins will still only build if there is an actual change to build.
- Trigger webhooks when pull requests are opened, reopened, or updated (thanks stupchiy for the research and lordmatanza for the pull request)
- Fixed bug in which non-admin users were unable to access webhook settings
- Made setup of the Jenkins repository easier by adding SSH/HTTP quick select
- Fire notification after pull-requests have been merged
- Added a plugin logo
- Added test button to the Hook Configuration display
- Added ability to not send notifications if commits/merges are made by specified Stash users
- Requires Stash 2.3.0
- Renamed plugin to Stash Webhook for Jenkins
- Added an option to "Skip SSL Certificate Validation", allowing for plugin to communicate with Jenkins instance using a self-signed cert (setting is on Hooks settings for each project)
- Handle Jenkins urls with trailing slashes more gracefully (thanks ellingbo)
- Initial release