Search code examples
jenkinscontinuous-integrationgerrit

Can't report +1 to gerrit server via jenkins


I tried to build CI on my system. The Jenkins could listen gerrit push event and checkout the code. But jenkins Gerrit-Trigger not reporting +1 verified after successful job run.

There is an error message in Console Output: ERROR Gerrit response: HTTP method POST is not supported by this URLFinished: SUCCESS

enter image description here

Versions:
Windows 10
Jenkins 2.263.1
Gerrit 2.10.2
Gerrit Trigger Plugin 2.32.0
Git Plugin 4.5.0

enter image description here

enter image description here

There are some warning, does it matter? enter image description here

My item Gerrit Reporting Values: enter image description here

EDIT

The Error message doesn't show again after modifying --message Message to double quotes (Manage Jenkins > Gerrit Trigger > Gerrit Verified Commands)

EDIT enter image description here


Solution

  • Some things you should consider:

    1. Your Gerrit version is (really) too old, it would be very good if you update to a newer version.

    2. Try to uncheck the "Use REST API" option at Manage Jenkins > Gerrit Trigger > Advanced > REST API. Maybe the Gerrit 2.10.2 REST API isn't compatible with the Gerrit-Trigger last version.

    3. Do you have the "Code-Review" and the "Verified" labels defined on Gerrit? Does the Gerrit user used by Jenkins have permission to perform the review (-1/+1)?