I assumed wrongly that the declaration "class GerritTrigger extends Trigger<AbstractProject>" was signal enough to core that it only applied to AbstractProject, but upon further inspection I noticed that the descriptor is returning true for everything in the isApplicable(Item) method. It should be checking for instance of AbstractProject, but then I would definitely break the templates.
Any suggestions? As much of the rest of the code is assuming AbstractProject the check should be there, I don't for example want to trigger an entire folder, but at the same time the templates are probably nice to have. Robert Sandell Software Tools Engineer - SW Environment and Product Configuration Sony Mobile Communications From: jenkinsci-dev@googlegroups.com [mailto:jenkinsci-dev@googlegroups.com] On Behalf Of Stephen Connolly Sent: den 12 december 2013 10:51 To: jenkinsci-dev@googlegroups.com Cc: Mathieu Wang Subject: Re: Beta release of Gerrit Trigger plugin 2.11.0 I can probably construct a literate build job or any multi-branch based project job that would blow up if you are assuming that you are always being added to an AbstractProject... On 12 December 2013 09:41, Sandell, Robert <robert.sand...@sonymobile.com<mailto:robert.sand...@sonymobile.com>> wrote: Actually the GerritTrigger class is quite explicit in its declaration to Jenkins that it asserts AbstractProject to be the item it is added to. Whatever kind of trickery the template plugin does after that is somewhat beyond its control. On the other hand I did a quick usage search for the trigger variable that is being declared on the line where it blows up and couldn't find any. @Mathew do you think it's safe to remove the <j:invokeStatic var="trigger"... tag on line 5 in config.jelly? Robert Sandell Software Tools Engineer - SW Environment and Product Configuration Sony Mobile Communications From: jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com> [mailto:jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com>] On Behalf Of teilo Sent: den 11 december 2013 17:45 To: jenkinsci-dev@googlegroups.com<mailto:jenkinsci-dev@googlegroups.com> Subject: Re: Beta release of Gerrit Trigger plugin 2.11.0 sorry trigger happy that should read "from an earlier post 2.10.1 release (aka 2.10.2-snapshot)" On Wednesday, 11 December 2013 16:43:32 UTC, teilo wrote: Not sure this is still the case (as its from an early post but the plugins assumptions about project types appears incorrect and results in the following error javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: file:/opt/jenkins/data/plugins/gerrit-trigger/WEB-INF/classes/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTrigger/config.jelly:6:68: <j:arg> Can't convert com.cloudbees.hudson.plugins.modeling.controls.DescriptorListControl@3e0dfca4<mailto:com.cloudbees.hudson.plugins.modeling.controls.DescriptorListControl@3e0dfca4> to class hudson.model.AbstractProject I don't think this is a regression in the Cloudbees templates (although they may have been upgraded at similar times). On Monday, 9 December 2013 18:45:07 UTC, Robert Sandell wrote: Did some fixes in this area and released 2.11-beta-2 Robert Sandell Software Tools Engineer - SW Environment and Product Configuration Sony Mobile Communications From: jenkin...@googlegroups.com<mailto:jenkin...@googlegroups.com> [mailto:jenkin...@googlegroups.com] On Behalf Of Sandell, Robert Sent: den 9 december 2013 16:48 To: jenkin...@googlegroups.com<mailto:jenkin...@googlegroups.com> Subject: RE: Beta release of Gerrit Trigger plugin 2.11.0 Ah, It's because the server config is retrieved via the serverName field of the trigger and not from the provider of the event. I noticed some other places where I've missed that particular issue. I'll start a 2.11-beta branch to work on these. Robert Sandell Software Tools Engineer - SW Environment and Product Configuration Sony Mobile Communications From: jenkin...@googlegroups.com<mailto:jenkin...@googlegroups.com> [mailto:jen...@googlegroups.com] On Behalf Of Jyrki Puttonen Sent: den 7 december 2013 18:00 To: jenkin...@googlegroups.com<mailto:jenkin...@googlegroups.com> Subject: Re: Beta release of Gerrit Trigger plugin 2.11.0 I found out one problem, using "Any Server" prevents Jenkins from reporting result to Gerrit. This happens from retriggering, pushing and from the search and trigger -page. Log has following line in every case: Caused by: java.lang.NullPointerException at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.schedule(GerritTrigger.java:531) At that line, there's PluginImpl.getInstance().getServer(serverName).getConfig().isGerritBuildCurrentPatchesOnly() I would guess that getServer return null when "Any Server" is selected. I'm not sure what should be done when the returned server is null, so I couldn't fix this myself :) On Sat, Dec 7, 2013 at 3:55 PM, Jyrki Puttonen <jyrk...@gmail.com<mailto:jyrk...@gmail.com>> wrote: Hi, I just installed the beta version, and had few problems. 1. Gerrit configuration was lost, and I had to add a new server. 2. Manual triggering from search didn't work. After following steps and testing after everyone it started to work - I had $GERRIT_REFSPEC as Branch Specifier, changed to $GERRIT_BRANCH - Changed server from Any Server to specific one - Touched every field in Project configuration (pattern, branch) Then it started to work. After it started to work, I changed server back to Any Server and Branch Specifier back to $GERRIT_REFSPEC and it seems to be working. Pushing to gerrit seems to be working, at least after I did those previous steps. I'll keep the beta version running and report if there's other problems. On Thu, Nov 28, 2013 at 5:40 PM, Sandell, Robert <robert....@sonymobile.com<mailto:robert....@sonymobile.com>> wrote: The notify parameter is not something you can set (yet), there is probably still much that can be done to enhance the usage of the REST API. The only thing that is used from the command settings is the contents of the message. Robert Sandell Software Tools Engineer - SW Environment and Product Configuration Sony Mobile Communications From: jenkin...@googlegroups.com<mailto:jenkin...@googlegroups.com> [mailto:jenkin...@googlegroups.com] On Behalf Of Øyvind Harboe Sent: den 28 november 2013 10:24 To: jenkin...@googlegroups.com<mailto:jenkin...@googlegroups.com> Cc: jenkins...@googlegroups.com<mailto:jenkins...@googlegroups.com> Subject: Re: Beta release of Gerrit Trigger plugin 2.11.0 Hi Robert, I installed the beta because I would like to switch from the ssh commands to REST API commands in order to more carefully manage which email notifications are sent out. Is there any documentation or pointers on how I can change the line below, which adds a comment that a build was started, to the REST API command to do the same, but set notify=NONE? gerrit approve <CHANGE>,<PATCHSET> --message 'Build Started <BUILDURL> <STARTED_STATS>' --verified <VERIFIED> --code-review <CODE_REVIEW> REST API feature that I would like to use: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#review-input On Tuesday, November 26, 2013 4:15:19 PM UTC+1, Robert Sandell wrote: I just released version 2.11.0-beta-1 of the Gerrit Trigger plugin. It contains some great new features by some great contributors, the release notes are on the wiki [1]. The support for multiple Gerrit servers required quite a lot of refactoring in central parts of the plugin that potentially could affect everything, so I released a beta that should be available in the experimental update center [2] within the normal waiting period. And I am looking for some brave people who can help us test it and provide me with a hint if it is good enough for a "normal" release or if there is anything major in need of fixing before. Thanks, Bobby [1] https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger [2] Set your update center to http://updates.jenkins-ci.org/experimental/update-center.json Robert Sandell Software Tools Engineer SW Environment and Product Configuration Development Environment Sony Mobile Communications Tel: +46 (0)10 80 12721<tel:%2B46%20%280%2910%2080%2012721> sonymobile.com<http://sonymobile.com/> -- 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<mailto:jenkinsci-de...@googlegroups.com>. 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 jenkinsci-de...@googlegroups.com<mailto:jenkinsci-de...@googlegroups.com>. 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 jenkinsci-de...@googlegroups.com<mailto:jenkinsci-de...@googlegroups.com>. 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 jenkinsci-de...@googlegroups.com<mailto:jenkinsci-de...@googlegroups.com>. 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 jenkinsci-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev+unsubscr...@googlegroups.com>. 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 jenkinsci-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev%2bunsubscr...@googlegroups.com>. 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 jenkinsci-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev+unsubscr...@googlegroups.com>. 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 jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.