Glusterfs开源社区使用 Git + Gerrit + Jenkins的开发流程。php
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
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
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对应一个分支。
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提一个。
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