How to integratte Gerrit with Jira?
Gerrit can be integrated with Jira. i.e. whenever Someone push the commits in gerrit with the Jira ID mentioned in git commit, the Jira ticket will be updated with Commit ID and Review#.
Same time, Jira can be integrated with Gerrit as well. In this case, you can find gerrit committed message Jira ID linked to Jira.
Install Gerrit plugins
- Log into your Jira instance as an admin.
Click the admin dropdown and choose Add-ons.
- The Manage add-ons screen loads.
Click Find new add-ons from the left-hand side of the page.
- Locate Gerrit Code Review for Jira via search.
Results include app versions compatible with your Jira instance.
- Click Install to download and install your app.
You're all set!
- Click Close in the Installed and ready to go dialog.
Configure Gerrit plugins
Please follow the images as below- In JIRA, navigate to Administration > Plugins > Gerrit Admin
- Enter hostname, port, and user under the SSH section
- Upload the SSH private key generated at (1) above
- Optionally change the Gerrit search query patterns:
12345
tr:%s - Look for the issue key in a "Bug:" or "Issue:" footer
topic:%s - Look for the issue key in the change Topic (uploaded using HEAD:refs/for/master/(issueKey))
message:%s - Look for the issue key in the commit message
Configure gerrit.config
123456789$ vi /opt/review_site/etc/gerrit.config
[commentlink "jira"]
match = ([A-Z]+-[0-9]+)
link = http://13.233.10.188:8080/browse/$1
$ /opt/review_site/bin/gerrit.sh stop
$ /opt/review_site/bin/gerrit.sh start
Please refer the image below


Reference
- https://github.com/MeetMe/jira-gerrit-plugin/blob/master/README.md
- https://marketplace.atlassian.com/apps/1210874/gerrit-code-review-for-jira?hosting=server&tab=support
- https://www.eburcat.com/2017/09/jira-gerrit-integration-experience/
- https://github.com/MeetMe/jira-gerrit-plugin
- https://community.atlassian.com/t5/Questions/JIRA-Gerrit-Plugin-config-issue/qaq-p/41445
- https://www.eburcat.com/2017/09/jira-gerrit-integration-experience/
- https://github.com/MeetMe/jira-gerrit-plugin
- https://stackoverflow.com/questions/21328402/how-to-connect-jira-and-gerrit
- https://community.atlassian.com/t5/Questions/JIRA-Gerrit-Plugin-config-issue/qaq-p/41445
![]() |