Review Board can integrate with Jenkins to do test builds of code changes and report the results back on a review request. This plugin provides the necessary APIs to facilitate this integration.
Once this plugin is installed, you'll need to configure your Review Board server inside Jenkins:
-
On your Jenkins server, navigate to
Manage Jenkins, then selectConfigure System. -
Scroll down until you reach the
Review Boardconfiguration section. -
Click
Add Review Board Serverto create a new Review Board server configuration. -
Enter your Review Board server URL into the
Review Board URLfield. This must match the server URL set in the Review BoardGeneral Settingspage. -
If you have previously created a credential for your Review Board API token, select it here and skip to the job configuration.
-
If you have not yet created a credential for the Review Board API token, click
Addand selectJenkins. -
In the prompt, set
KindtoSecret text. -
Set
ScopetoGlobal. -
Fill in
Secretwith theReview Board API Tokenfound in the Jenkins CI integration configuration page in the Review Board administration UI. -
Give your secret a unique identifier in the
IDfield and clickAdd. -
Click
Saveto save your server configuration.
For each job you wish to use on Jenkins, you must add four new build parameters that will be used to give Jenkins information on the incoming review request. To add these, perform the following steps:
-
Navigate to your job's page and click
Configure. -
Ensure the
This project is parameterizedcheckbox is checked. -
For each of the following parameter names, repeat these two steps:
REVIEWBOARD_REVIEW_IDREVIEWBOARD_DIFF_REVISIONREVIEWBOARD_STATUS_UPDATE_IDREVIEWBOARD_SERVER
- Click
Add parameterand selectString parameter - Input the parameter name into the
Namefield and leave all other fields blank.
-
Scroll down to the
Buildsection. Here we can add theApply patch from Review Boardstep by clickingAdd build stepand choosing it from the dropdown menu.Note: This step uses RBTools to apply the patch from Review Board. It will attempt to install the package using pip, but if it lacks permission you will need to manually install it. Additionally, the order of your build steps matter, so this step should likely be the first build step so all later build steps see the correct source code.
-
Scroll down to the
Post-build actionssection. Here we can add thePublish build status to Review Boardstep by clickingAdd post-build actionand choosing it from the dropdown menu. -
Click
Saveto save these changes.