Reputation: 3031
I'm trying to configure a local installation of Jenkins to review uploaded changes on Gerrit. So far, I've gotten Jenkins to detect uploaded changes and build them (using Gerrit Trigger). However, while the build concludes successfully on Jenkins, it doesn't post any reviews on Gerrit, even though it is configured to do so. Interestingly, in Gerrit change history, I can see Jenkins having started a build:
Jenkins Patch Set 1: Build Started http://localhost:8080/job/TestProject/70/
but that's it. No results are shown after this, like successful conclusion of the build etc. Since I can see the build started result, I'm assuming I've configured the review settings correctly, but something else is causing a hold up. I've checked in the Gerrit error_log file and it doesn't show any errors. What maybe the issue?
By the way I've been able to verify/review the code as jenkins using the command line.
Upvotes: 1
Views: 3205
Reputation: 1
Some basic information can be found also in Jenkins plugin
Create the profile through in Gerrit web interface for your Jenkins user, and set up a SSH key for that user. Gerrit web interface > Admin > Groups > Non-Interactive Users > Add your jenkins user. Admin > Projects > ... > Access > Edit Reference: refs/* Read: ALLOW for Non-Interactive Users Reference: refs/heads/* Label Code-Review: -1, +1 for Non-Interactive Users Label Verified: -1, +1 for Non-Interactive Users
Upvotes: 0
Reputation: 3031
I was able to resolve this by adding the 'Verified Label' to the Gerrit Server. The version of Gerrit I used (2.11.3) explicitly asks you to install the Verified Label, and the default option is set at No and as a result I didn't install it. I simply reinstalled my Gerrit, this time choosing Yes on Install Verified Label. If you're facing this issue, simply reinstall your Gerrit. If re-installation is not an option, read this:
http://blog.bruin.sg/2013/04/how-to-edit-the-project-config-for-all-projects-in-gerrit/
Upvotes: 0
Reputation: 400
To make code verification possible, you have to go through the following steps:
Upvotes: 3