Gerrit approval process settings

Source: Internet
Author: User

This document describes how to use gerrit2.4.2 to set the approval process.

First, Gerrit already has two accounts, one being my account, an administrator, and the other being an engineer.

This article describes a simple approval process:

Submitted by engineerCode, I review and submit the code.

Step 1: Create a reviewer group and a Verifier Group

Reviewer is responsible for review

Verifier submits review results to the GIT central repository

Then set the members. Because I am the administrator, I will naturally be in both the reviewer and verifier groups.

Step 2: Create a project team. For example, here is the appengine team, which includes engineers.

Step 3: Set review and verifier permissions. For the sake of simplicity, Gerrit is used to set the following parameters in all projects access:

Csdn cannot upload images today. It is simply described as follows:

In the refs/* path, add the reviewer group. The permission is label code-Review and the range is-2 ~ + 2

In the refs/* path, add the Verifier Group. The permission is label verifier and the range is-1 ~ + 1

Step 4: Set access permissions for the project to be managed.

Add the appengine team group to the refs/For/* path. The permission is push.

Explain that every time an engineer pushes the ref/heades/Master directly to the central warehouse through git push, it will fail. Push to ref/For/master only, waiting for approval.

After the server is configured, set the client.

Step 5: Set the push shortcut

Each Command: git push origin head: refs/For/master is prone to errors. Therefore, add a configuration section in the. Git/config file in the project directory cloned from the client:

 
[Remote "Review"] pushurl = SSH: // wangxd555@10.112.18.189: 29418/appengine. Git push = head: refs/For/master pull epack = git receive-pack -- reviewer csfreebird

In this way, you can use git push review to push.

Step 6: To prevent a change from being called back and modified and then submitted as a new change, use the hook script provided by Gerrit.

SCP-P 29418-P username @ gerrit_server:/hooks/commit-MSG. Git/hooks

It works normally now.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.