Unable to set up “Sonar Gerrit” Jenkins plugin

前端 未结 3 1199
悲哀的现实
悲哀的现实 2021-01-25 06:28

I am trying to set up Sonar Gerrit - Jenkins Plugin on a Jenkins job.

Context

  1. A Jenkins job is launched when a patch set is created to Ge
3条回答
  •  一向
    一向 (楼主)
    2021-01-25 06:46

    I suspect there's a issue with your REST API connection between Jenkins and Gerrit.

    The "Sonar Gerrit" plugin uses the "Gerrit Trigger" plugin to post messages in Gerrit. The "Gerrit Trigger" plugin can use two different methods to post messages in Gerrit: SSH or REST API.

    The "Build Failed ... FAILURE" message is posted directly by "Gerrit Trigger" plugin and it can be performed using SSH. The "Sonar Gerrit" messages CAN'T be performed using SSH, they need to be done using REST API so the "Gerrit Trigger" plugin needs to be configured to use REST API to enable "Sonar Gerrit" plugin to post in Gerrit.

    See more info here.

    Go to Jenkins > Manage Jenkins > Gerrit Trigger > Edit > Advanced

    And check if the REST API is enabled and if it's working as expected (using the "Test REST Connection" button)

提交回复
热议问题