Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using Jenkins 1.557 to watch a Gerrit 2.8 instance for changes. I am using the following plugins:

  • Git Plugin 2.1.0
  • Git Client Plugin 1.7.0
  • Gerrit Trigger 2.11.1

When I use "test connection" on the Gerrit Trigger, it returns success, so I know the credentials are working. I'm using the default values under the "advanced" button.

For my test build type, I'm using a git repo, which Jenkins checks out (I added a post build step of "ls -l" and it shows the repo contents correctly). I have the build trigger set to "gerrit event" and for "gerrit trigger" I have "Check non-reviewed patchsets" selected, and a trigger for "patchset created" enabled. The gerrit project settings seem correct.

I cannot get the build to fire by uploading a new change or a new patchset for a change. When I manually fire the build using the "Query and trigger Gerrit patches" button, the build happens, but no votes are recorded. I'm clearly missing on part of the puzzle - if I ssh into gerrit and do a "stream-events", I see the events I'm expecting to see.

Jenkins - the definitive guide - from O'Reilly does not really cover Gerrit. I'm trying to avoid polling because there will be dozens of git repos managed by this Jenkins instance.

What is the next step in debugging?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

There have been some changes in the past, which broke the plugin:

  • Gerrit 2.8 removed the deprecated approve command, which AFAIK broke the plugin, see discussion and Release Notes. This was fixed with 2.11.0-beta1, so I guess this is not the case for you.

  • Gerrit 2.7 introduced the Stream Events privilege, which disallows users to receive stream events by default, see Release Notes. Very likely, your Jenkins user does not have this access privilege and thus no builds are triggered after pushing a change.

share|improve this answer
    
WRT Stream Events, the Jenkins user is in group "Non-Interactive Users", and that group has Steam Events: Allow in the global permission block (All-Projects). If I ssh in with the Jenkins user credentials, I do see the events. WRT approve/review, the commands for the gerrit verified commands blocks show gerrit review ... for each one, so it shouldn't be an issue. I will try manually using those commands, though –  Ry Jones Apr 2 at 21:33
    
It looks like the "--verified" command is gone, too. Adding "-l VERIFIED=<VERIFIED>" instead makes the values show up correctly. Now to figure out the trigger itself. –  Ry Jones Apr 2 at 22:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.