stash-jenkins-postreceive-webhook
stash-jenkins-postreceive-webhook copied to clipboard
The plugin could be made more generic
I installed this plugin and I am currently using it to notify my buildbot. Currently there is almost nothing Jenkins specific in this plugin and it could be used as a generic webhook.
One exception is that the plugins unconditionally adds the /git/notifyCommit?url=...
part to the URL, but the whole generated URL could be put in the Jenkins URL field as well. It's a little less user friendly, but much more flexible.
This is very similar to the request in issue #14. I have considered this approach, but not all webhook URLs are just simple GET requests. Some require authentication (OAuth, Basic, etc.), some webhooks want POST data in a certain format, etc.
The current thought is this plugin may be able to expand to a generic webhook plugin as long as the other end is a simple GET request. If it's more than that, it'll have to be considered on a case-by-case basis and may just require its own custom plugin.
Make sense?
Absolutely. Actually, just being able to specify the whole URL (as it is a constant anyway and does not contain any change-specific data) would be enough.
For more complex webhooks, I agree with you, specific solutions are more appropriate.
A possible way maintain the current user-friendliness for Jenkins users: a simple javascript callback which shows the Jenkins-specific URL while typing it in (i.e. appending /git/notifyCommit?url=...
) and a button to copy it to the input field may be enough.
Hello,
perhaps it is possible for you to deliver an "extension point", which allows generic description of the expected format on the other side. I haven't checked if it is possible to create Plugins for Plugin otherwise a simple xml upload describing the format would do the same.
I would also like this feature.