Gerrit 系统初探
2013-11-22 13:50
375 查看
Gerrit使用简介
Gerrit,一种免费、开放源代码的代码审查软件,使用网页界面。利用Gerrit审核系统搭建过程
创建gerrit2用户
$sudouseradd-m-d/home/gerrit2-s/bin/bashgerrit2$sudosugerrit2
安装mysql以及java环境
略。apt-get配置mysql
#mysql-uroot–pMysql>
#CREATEUSER'gerrit2'@'localhost'IDENTIFIEDBY'secret';
#CREATEDATABASEreviewdb;
#ALTERDATABASEreviewdbcharset=latin1;
#GRANTALLONreviewdb.*TO'gerrit2'@'localhost';
#FLUSHPRIVILEGES;
下载gerrit并进行初始化
$wget$java-jargerrit-2.7.warinit-dreview_site
参见
Create'/home/gerrit2/review_site'[Y/n]?Y
LocationofGitrepositories[git]:
Databaseserver
type[h2]:mysql
GerritCodeReviewisnotshippedwithMySQLConnector/J5.1.21
**Thislibraryisrequiredforyourconfiguration.**
Downloadandinstallitnow[Y/n]?Y
Downloading
Checksummysql-connector-java-5.1.21.jarOK
Serverhostname
[localhost]:
Server
port
[(mysqldefault)]:
Database
name
[reviewdb]:
Database
username
[gerrit2]:
gerrit2's
password
:secret
confirmpassword:
SMTPserverhostname
[localhost]:
SMTPserver
port
[(default)]:
SMTP
encryption
[NONE/?]:
SMTP
username
:
更具体是进行初始化
运行gerrit审核系统
$./review_site/bin/gerrit.shstart登录gerrit审核系统官网
默认端口号:8080修改gerrit界面颜色
默认情况下是纯白色的,不美观可以对review_site/etc/gerrit.config修改,然后重启服务,下面是一个颜色配置模板:
[theme]
backgroundColor=FCFEEF
textColor=000000
trimColor=D4E9A9
selectionColor=FFFFCC
topMenuColor=D4E9A9
changeTableOutdatedColor=F08080
[theme
"signed-in"]
backgroundColor=FCFEEF
textColor=000000
trimColor=D4E9A9
selectionColor=FFFFCC
topMenuColor=D4E9A9
changeTableOutdatedColor=F08080
更多信息,索引
Gerrit系统正常测试
ssh-p29418username@webhost测试gerrit是否正常运行,根据http://www.infoq.com/cn/articles/Gerrit-jenkins-hudson/修改相关ssh配置,成功后会显示如下信息:
****WelcometoGerritCodeReview****
Hidemo,youhavesuccessfullyconnectedoverSSH.
Unfortunately,interactiveshellsaredisabled.
TocloneahostedGitrepository,use:
gitclonessh://demo@localhost:29418/REPOSITORY_NAME.git
Connectiontolocalhostclosed.
Gerrit创建第一个项目
创建项目,克隆病推送代码!ssh-p29418admin@localhostgerritcreate-project--nameexample.git
注意:在gerrit系统上第一个注册的人自动成为管理员,只有管理员才有创建project权限
Github+gerrit+Jenkins(hudson)+redmine
职责:
工作流:
developerchecksoutsourcefromgithub.developermakeschanges.
developerpushestogerrit.
gerritsendschangenoticetojenkinsforintegrationtest.
jenkinspullschangesdirectlyfromgerritgitserver.
onpass,jenkinsadds+1togerritreview,passesreviewtootherdevelopers.
onfailure,jenkinsadds-1togerritreview
pass/failstatuspushedtoredmine
otherdevelopersreviewchange,approve(+2)
gerritcommitschangestogithubrepository.
githubhooknotifiesredmineofupdates.
redminepullschangesfromgithub,parsescommitmessagesforticketinformation.
developerfetchschangesfromgithub...backto2.[EDIT]:weswitchedtopullingdirectlyfromgerrit.Githubremainsasamirrorforpullingproductionsources.
安装运行Jenkins
根据jenkins+github
java-jarjenkins.war--httpPort=$PORT--httpListenAddress=$HTTP_HOST
howtousejenkins:
OpenStack审核流程图:
Background
AvailableLinks:
Jenkins学习:Gerrit学习:
Gerritintroduction:
Gerritinstallation:
Git、Gerrit与Jenkins/HudsonCI服务器:
GerritJenkinsGithub:
IdeasandActions:
Gerrit工作流:
gitdiff的用法:
gitrebase用法:
Gerrit安装:
图解GIT:
相关文章推荐
- reference引用和return address类型
- We Recommend a Singular Value Decomposition
- 我在阿里云玩蟹科技分享篇
- JavaScript中的对象与构造器
- Linux内存映射(mmap)简析
- c# web gridview checkbox 应用
- Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, V
- 读《设计模式解析》
- servlet生成验证码
- 再谈windows下几个重要的DOS命令和命令组合,工作中常用
- 微软正式发布Windows 1.0 回顾历代Windows版本界面
- 当Selenium遇到TestNG
- android通过USB使用真机调试程序(转)
- XE5 Android 手机端中文显示乱码问题
- JavaScript中__proto__与prototype的关系
- ios RunLoop 用法
- 配置思科的日志系统 推荐
- 防止重复登陆的思路
- Eclipse DDMS 无法查看手机/data/data
- 执行查看数据库表空间信息报错 ORA-01116、ORA-01110、ORA-27041