Workflow Plugin and Snippet Generator

70 views
Skip to first unread message

Gregory Symons

unread,
Jul 2, 2015, 11:40:46 AM7/2/15
to jenkin...@googlegroups.com
Hi all!

I'm currently working on updating the analysis suite plugins to work with the workflow plugin, and I've got almost everything working, except the snippet generator doesn't seem to generate useful snippets. Since these plugins can take _a lot_ of parameters, I think it's really important from a usability standpoint to get this working before I open the pull requests to merge it upstream. However, I'm not sure what's wrong or where to look to fix it.

Basically, what's happening is that the snippet generator properly shows the configuration UI for the individual plugins, but when you generate the groovy code, instead of a usable build step, you get something like this:

step <object of type hudson.plugins.checkstyle.CheckStylePublisher>

I'm sure there's something simple that I'm missing, since I was able to update the scoverage plugin for workflow, and don't remember doing anything to get the snippet generator working correctly; but, that's a much simpler plugin than the analysis suite. Any help you can give me would be much appreciated.

Thanks,

Greg Symons

Oleg Nenashev

unread,
Jul 5, 2015, 6:06:42 AM7/5/15
to jenkin...@googlegroups.com
Hi Gregory,

It would worth if you send a link to the current code state in your local branch.
AFAIK workflow plugin operates with SimpleBuildSteps supporting DataBoundConstructors, and there can be issues with plugins using newInstance(). I'm not sure it's related to your case.

четверг, 2 июля 2015 г., 18:40:46 UTC+3 пользователь Gregory Symons написал:

Gregory Symons

unread,
Jul 6, 2015, 1:41:02 PM7/6/15
to jenkin...@googlegroups.com
All my changes have been pushed to my Github forks: https://github.com/gregsymons/analysis-suite-plugin/tree/workflow-support. Note that while the github UI seems to magically know how to resolve the submodules, git itself won't, because I didn't update the submodule urls to point at my forks to make merging upstream easier.

I've tried to follow the COMPATIBILITY.md guidelines and change over from the sprawling DataBoundConstructors (the base class for all the analyses takes 28 parameters!) to DataBoundSetters. I don't know if that could be part of the problem. I don't _think_ these plugins use newInstance() anywhere, but I'm also not sure I know exactly what you mean.

Greg

Jesse Glick

unread,
Jul 27, 2015, 2:19:19 PM7/27/15
to Jenkins Dev
On Thu, Jul 2, 2015 at 11:40 AM, Gregory Symons
<gsy...@gsconsulting.biz> wrote:
> I'm currently working on updating the analysis suite plugins to work with
> the workflow plugin

I hope you are coördinating with @amuniz who is also working on this?

https://github.com/jenkinsci/analysis-core-plugin/pull/31

> when you generate the groovy code, instead of a usable build step, you get something like this:
> step <object of type hudson.plugins.checkstyle.CheckStylePublisher>

Generally this means something is written badly in how the
`Describable` is configured in Jelly vs. `Descriptor.newInstance` vs.
`@DataBoundConstructor`/`@DataBoundSetter`.

Manuel Jesús Recena Soto

unread,
Jul 27, 2015, 3:03:59 PM7/27/15
to jenkin...@googlegroups.com
And I'm working on making CheckStyle Plugin compatible with Workflow:
https://issues.jenkins-ci.org/browse/JENKINS-29648

Regards,
> --
> 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 jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr18_zWUV%2BNptRg8c2htiAq92w%2Bsvf8_p%2Bj9HzaTe_Meig%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Manuel Recena Soto
* manuelrecena.com [/blog]
* linkedin.com/in/recena

Gregory Symons

unread,
Aug 6, 2015, 2:19:37 AM8/6/15
to jenkin...@googlegroups.com
On Mon, Jul 27, 2015 at 1:19 PM, Jesse Glick <jgl...@cloudbees.com> wrote:
On Thu, Jul 2, 2015 at 11:40 AM, Gregory Symons
<gsy...@gsconsulting.biz> wrote:
> I'm currently working on updating the analysis suite plugins to work with
> the workflow plugin

I hope you are coördinating with @amuniz who is also working on this?

https://github.com/jenkinsci/analysis-core-plugin/pull/31


I was unaware of @amuniz's work. Now that I look at that pull request, it looks like it's a lot closer to good than mine would be... I think I'll just let my work die and wait for that PR to come in... what I've got works well enough for me for the time being. I never really felt comfortable with tackling such a huge set of plugins, given my inexperience with Jenkins internals.

--
Greg Symons

Antonio Muñiz

unread,
Aug 6, 2015, 8:10:31 AM8/6/15
to jenkin...@googlegroups.com

On Thu, Aug 6, 2015 at 8:19 AM, Gregory Symons <gsy...@gsconsulting.biz> wrote:
what I've got works well enough for me for the time being

If you still want to contribute, It'd be great if you perform some tests based on the PR using last releases of downstream plugins (basically the ones listed in https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins).

It would be a good backward compatibility test.

--
Antonio Muñiz
Software Engineer
CloudBees, Inc.

Reply all
Reply to author
Forward
0 new messages