Skip to main content
Version: QB90

Working with Gerrit

QuickBuild integrates with Gerrit via the Gerrit repository to verify gerrit changes.

How to integrate

To build against Gerrit changes, define a Gerrit repository like below:

And then add a checkout step in your step workflow to check out that repository, followed by appropriate build/test steps to verify checked out code. Upon initial triggering of the configuration containing this checkout step, QuickBuild will call Gerrit RESTful API to spawn a build request for each open change (or open change of specified branch if branch is specified in gerrit repository). Subsequent triggering of the configuration will only spawn build request for new change and change with new patch sets. In order to provide fast feedback of the changes, please make sure the configuration can run concurrently by enable concurrent mode in general setting of the configuration, and then configure node selection of the master step so that different build requests can run on different build agents.

After build finishes, QuickBuild will update relevant changes Gerrit server with the build information including build url. Further, if label scoring is enabled when define Gerrit repository, QuickBuild will score specified Gerrit label based on build status like below:

Trouble shooting

TroublePossible Causes
No any build requests are spawned upon triggering the configuration* The user specified in Gerrit repository definition does not have read permission against reference refs/* * There are no new changes or updated changes (changes with new patch sets). If you want to build against open changes even if they have been built before, please turn off option Queue Changed Branches Only in advanced setting of the configuration
QuickBuild can not score specified Gerrit label* The label is not defined at Gerrit side. Refer to Gerrit documentation on how to do this * The user specifid in Gerrit repository definition does not have permission to score the label