I do not think this is the right way to go at all. There is a refactoring or two from my PoV to take place in the current plugin and that will result in much cleaner code without fracturing things.
While there are multiple webhook plugins available for BB server, from my understanding there is only one that has the events required to give efficient event notification for scm api (and I had to write the patch to get that too!) I think it is much better to just highlight the best path and make that rock solid My €0.02 anyway - Stephen On Sun 12 Mar 2017 at 13:05, 'Robin Müller' via Jenkins Developers < [email protected]> wrote: > Hi there, > > I started implementing a new plugin "Bitbucket Server Branch Source" which > provides the functionality to configure Bitbucket Server projects with > the help of a SCMSourceNavigator. > I know there is already a plugin called "Bitbucket Branch Source" which has > also support for Bitbucket Server. But I see several issues with this > plugin. Bitbucket Cloud and Bitbucket Server are 2 different software > artifacts that just sound similar but behave different in many ways. If > you have a look to the code of the plugin you'll find a lot parts where > it has to distinguish between Bitbucket Cloud and Bitbucket Server. This > code would become obsolete if there are 2 plugins, one for handling > Bitbucket Cloud and one for Bitbucket Server. One big difference between > these 2 tools is that Bitbucket Cloud has built-in WebHooks and for > Bitbucket Server you have to install an additional add-on. And there are > several of them out there. To make everyone happy the Jenkins plugin > should support all available Bitbucket Server WebHook add-on. In the new > plugin I would try to reach this by providing an extension API which > decouples the add-on specific code from the "Bitbucket Server Branch > Source". To support a Bitbucket Server WebHook add-on it's just necessary > to implement a separate plugin that implements this API. Doing this in > the existing "Bitbucket Branch Source" plugin has 2 drawbacks: > 1. it makes the already complex code of the plugin even more complex > 2. the code base isn't very clean, if I would provide this change as a Pull > Request it would take me weeks to get it working with the risk that the > change will break something else > > IMHO having 2 plugins "Bitbucket (Cloud) Branch Source" and "Bitbucket Server > Branch Source" is the best we can do. And I'd assume that the "Bitbucket > Branch Source" plugin would never have got support for Bitbucket Server > if it would be still named Atlasian Stash. > > If you have the same opinion it would be nice if somebody with the necessary > permissions can create the following 2 git repositories in the jenkinsci > organization and give me write access for them: > bitbucket-server-branch-source > bitbucket-server-webhook-api > > Regards, > Robin > > P.S. the current status of my plugin can be seen here > https://github.com/coder-hugo/bitbucket-server-branch-plugin > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/b726aa13-db0c-422f-8ae2-903b52aa8233%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/b726aa13-db0c-422f-8ae2-903b52aa8233%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Sent from my phone -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMxVKjFVJa0AezFaM4puYySw3udid_aEqsG_UKuKeNbaOQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
