Important gerrit commands

This post list the details of some of the important gerrit commands which we have tried, (This post will be updated as and when we use the commands)

Note: The gerrit commands are executed on Ubuntu gerrit review server https://review.opendev.org/ . You may need to register to execute same commands on this server.

Check gerrit version

$ ssh -p GERRIT_PORT -i PATH_TO_SSH_PRIVATE_KEY GERRIT_SERVER_URL gerrit version

Example of this is,

$ ssh -p 29418 -i /home/devlab/.ssh/id_rsa review.opendev.org gerrit version
  • “-p” you can change the gerrit port used for ssh authentican.
  • “-i ” – specify ssh private key.

Check list of projects from gerrit server

$ ssh -p GERRIT_PORT -i PATH_TO_SSH_PRIVATE_KEY GERRIT_SERVER_URL gerrit ls-projects
$ ssh -p 29418 -i /home/devlab/.ssh/id_rsa review.opendev.org gerrit ls-projects

Get the information from gerrit server

$ ssh -p GERRIT_PORT -i PATH_TO_SSH_PRIVATE_KEY GERRIT_SERVER_URL gerrit query project:{^PROJECT_NAME} --format=JSON --all-approvals --comments --all-reviewers

You can use the project name as obtained using “gerrit ls-projects” command as above to get the information such as approvals, comments, reviews etc in the format of JSON.

$ ssh -p 29418 -i /home/devlab/.ssh/id_rsa review.opendev.org gerrit query project:{^All-Projects} --format=JSON --all-approvals --comments --all-reviewers

lynxbee_ezoic

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded