After making commits to 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 Stash.
- 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 (can use H 0 1 1 0 as an example)
- 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
If you found this plugin useful, please consider leaving us a rating on our Atlassian Marketplace listing. Thanks!
If you've benefited from this open-source project, please take a moment and donate to its continued maintenance and development.
Forget buying me a beer (don't drink anyways)... they're going to pay off student loans, save up for a house, college funds, and who knows? maybe a toy or two.
- Square Cash: Send email to [email protected]
- PayPal:
- Added ability to not send commit hash in Jenkins notification
- Reverted pull-request notifications back to where it was before
- Fixed a Javascript error when opening plugin settings
- 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
- 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
- Fixed syntax error in Javascript for the "Trigger Build" button (thanks dojcsak for the pull request)
- 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