GlusterFS社區開發流程

Glusterfs開源社區使用 Git + Gerrit + Jenkins的開發流程。php

 

Register

Sign up for an account at http://review.gluster.org by clicking 'Register' on the right-hand top. You can use yourgmail login as the openID identity.git

 

首先須要去 http://review.gluster.org 註冊一個帳號,你須要有gmail帳號或者其餘OpenID帳號來註冊和登錄。github

 

SSH keys

Provide your SSH public key into Gerrit so that you can successfully access the development git repo as well as push changes for review/merge.ssh

 

而後須要向Gerrit提供你的SSH公鑰,這樣你才能訪問開發代碼庫,以及提交代碼。ide

Settings -> SSH Public Keys -> Add Key...this

 

Clone a working tree

Get yourself a working tree by cloning the development repository from Gerritspa

$ git clone ssh://[username@]git.gluster.org/glusterfs.git glusterfs

克隆git庫,得到代碼code

 

修改代碼...

在修改代碼以前,將如下兩行加入glusterfs/.git/configorm

[user]
       email = [your.email]
       name  = [your.name]

Typically you would have a local branch per task, and most of the times that branch will have one commit.blog

再建立一個本地分支,一般是一個修改/commit對應一個分支。

 

Commit

You will need to sign-off your commit (git commit -s) before sending the patch for review. By signing off your patch, you agree to the terms listed under "Developer's Certificate of Origin" section in the CONTRIBUTING file available in the repository root.

Provide a meaningful commit message. Your commit message should be in the following format

A short one line subject describing what the patch accomplishes
    An empty line following the subject
    Situation necessitating the patch
    Description of the code changes
    Reason for doing it this way (compared to others)
    Description of test cases

在向社區提交你的代碼以前,你須要在你的patch上簽名(git commit -s),  這樣就表示你贊成CONTRIBUTING文件中Developer's Certificate of Origin一節列出的條款。

你須要按照如下格式寫commit message

 

rfc.sh

After doing the local commit, it is time to submit the code for review. There is a script available inside glusterfs.git called rfc.sh. You can submit your changes for review by simply executing

$ ./rfc.sh

Prompt for a Bug Id for each commit (if it was not already provded) and include it as a "BUG:" tag in the commit log. You can just hit <enter> at this prompt if your submission is purely for review purposes.

 

在提交了本地commit後, 接下來將commit提交代碼審查。在代碼庫裏面有一個rfc.sh腳本。簡單執行下這個腳本就提交commit了。

腳本執行過程當中,會提示你輸入bug id, 這個是必須有的,否則社區的人會提醒你.  :-/

若是沒有,可用先向redhat bugzilla提一個。

 

Amend

Code review comments are notified via email. After incorporating the changes in code, you can mark each of the inline comment as 'done' (optional). After all the changes to your local files, amend the previous commit with these changes with -

$ git commit -a --amend
  $ ./rfc.sh

代碼審查意見會以郵件的形式通知。在對代碼進行相應的修改後,你能夠使用如下命令再次提交代碼。

 

以上是社區開發的基本流程,所有流程在:

 http://www.gluster.org/community/documentation/index.php/Development_Work_Flow


轉自:http://glusterfs.iteye.com/blog/1833389

相關文章
相關標籤/搜索