stash-jenkins-postreceive-webhook icon indicating copy to clipboard operation
stash-jenkins-postreceive-webhook copied to clipboard

The plugin could be made more generic

Open GaretJax opened this issue 11 years ago • 4 comments

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.

GaretJax avatar May 31 '13 03:05 GaretJax

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?

mikesir87 avatar May 31 '13 03:05 mikesir87

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.

GaretJax avatar May 31 '13 03:05 GaretJax

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.

CSchulz avatar Dec 10 '13 11:12 CSchulz

I would also like this feature.

ggmsfo avatar Dec 10 '14 22:12 ggmsfo