> Hi > > I've been developing a small plugin[1] which will submit[2] warnings from > static analysis plugins to Gerrit [3]. There's a two questions where I'd > liked to have some comments, proposals or answers: > > 1. Is developing a "integrator" plugin a good way to achieve this? This > functionality could be added to either of these two plugins, but it just > doesn't feel right. And what about other plugins which would like to post > comments to Gerrit? Should there be one integrator plugin for each, should > they just submit straight to Gerrit or something different? Some parts in my > plugin could be reused in other cases, mainly the logic which finds out the > build of parent commit. >
This looks like something similar to the CI game plug-in: here we also have some source plug-ins (e.g., static analysis) and another plugin that consumes the results and posts them on a different page. So I think your plug-in should be a stand-alone plug-in that uses e.g. the analysis-collector plug-in. Then others can add additional dependencies which will post additional messages to gerrit. > 2. How does dependencies between plugins work? Will Jenkins allow updating of > Gerrit or Static Analysis Collector -plugin if my plugin depends on explicit > version of those? > You just need to define the dependency in the pom, probably marked as optional if not every client of your plugin will use every comment source. In the pom you define a minimum version you are depending on. Normally, plug-ins try to ensure backward compatibility (as core does… ) so you can safely update the dependencies without breaking anything... > Not so much as a question, but as generic wondering: should Jenkins core > handle the discovery of the build of the parent commit? At the moment, > AbstractBuild::getPreviousBuild seems to return the n-1 build, but that might > not be the case when there's more than one branch. Or is there something > already done for this? > > -Jyrki > > [1] https://github.com/jyrkiput/gerrit-static-analysis-comments > [2] > https://dl.dropboxusercontent.com/u/2556134/example_gerrit_static_analysis.png > [3] https://code.google.com/p/gerrit/ > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
