Subversion+Bugzilla+Codestriker CM Environment Integration

上一篇 / 下一篇  2009-03-31 09:36:10 / 个人分类:工作

参阅本资料,本管视读者已掌握MySQL,Apache Server基本使用以及相关的Linux环境下的常用命令.

Requirements:

Subversion的成功安装与配置,可参考本管之前的日志http://www.51testing.com/?uid-75198-action-viewspace-itemid-113835

Bugzilla的成功安装与配置,可参考本管之前的日志:

http://www.51testing.com/index.php?uid-75198-action-viewspace-itemid-97966

Codestriker的安装,具体步骤记录如下:

Codestriker的当前最新版本是:1.9.8, 获取地址:http://codestriker.sourceforge.net/

1.创建Codestriker数据库:

#mysql -uroot -p×××      //进入mysql

#CREATE DATABASE codestrikerdb CHARACTER SET utf8;

GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP,REFERENCES
ON codestrikerdb.* TO codestriker@localhost IDENTIFIED BY 'cspasswd';

FLUSH PRIVILEGES;

QUIT

2.配置Codestriker.

#tar zxvf /var/www/codestriker-1.9.8.tar.gz

#chown -R apache.apache /var/www/codestriker-1.9.8

这里的apache是指Apache服务的用户.根据实际情况自行调整.

3.配置codestriker.conf

Codestriker数据库参数配置配置:

$db = 'DBI:mysql:dbname=codestrikerdb';
# Database user.
$dbuser = 'codestriker';     //数据库用户

# Database password.
$dbpasswd = 'cspasswd';	  //用户密码
E-Mail配置:
根据实际情况进行配置.主要有以下几个参数:
# Location of the mailing host.  This is used when sending out # codestriker comments.
$mailhost = 'localhost';
# Set the user and password parameters if $mailhost requires
# SMTP authentication.  If commented out, it is assumed         # thentication  is not required.
$mailuser = 'smtpuser';
$mailpasswd = 'smtppasswd'
Subversion配置:
# Location of the svn binary.
$svn = '/usr/local/subversion/bin/svn'; #subversion install path
@valid_repositories =
(
'svn:file:///svnroot/repository',
);
$repostitory_name_map =
{
'svn:http://URL/visit/Subversion;username;passowrd' => 'Input what you want'
example: 'svn:http://127.0.0.1/repo;tom;tom' => 'repo name'
};
Bugzilla配置:
主要如下几个参数需要进行配置:
# Bug tracking type.
$bug_db = 'bugzilla';
# Bug database connection details.
$bug_db_host = 'localhost';          //bugzilla数据库所在主机
$bug_db_name = 'bugs';               //bugzilla数据库名  
$bug_db_password = 'bugs_password';  //bugzilla数据库密码
$bug_db_dbname = 'bugs';             //bugzilla数据库名  


# Bugzilla codestriker user id.
$bug_db_user_id = '2';
user id可根据实际情况进行配置,具体可使用如下命令查询实际user id:
SELECT userid FROM profiles WHERE
login_name ='codestriker@yourhost.yourdomain';
# The URL to the bug tracking system.  The bug number is appended to the
# end of this string when URLs are generated.  This can be left blank if
# there is no need for bug-tracking integration.  Below are some example
# URLs for Bugzilla and Flyspray.
#$bugtracker = '';
$bugtracker = 'http://localhost/bugzilla/show_bug.cgi?id=';
#$bugtracker = '/flyspray_dev/?do=details&id=';
codestriker.conf文件中的其他参数可选,根据实际情况进行配置即可.
4.运行install.pl文件.
# cd /var/www/codestriker/bin
# ./install.pl
根据提示安装缺失的perl模块.
5.配置Apache Server.
在httpd.conf文件末尾添加如下内容:
ScriptAlias /codestriker/  /var/www/codestriker/codestriker-1.9.8/cgi-bin/
Alias /codestrikerhtml/  /var/www/codestriker/codestriker-1.9.8/html/

<Directory "/var/www/codestriker/codestriker-1.9.8/cgi-bin/">
   AllowOverride None
   Options ExecCGI
   Order allow,deny
   Allow from all
   SetHandler cgi-script.
</Directory>

<Directory "/var/www/codestriker/codestriker-1.9.8/html/">
   AllowOverride None
   Allow from all
</Directory>

最后重启Apache Server.即可通过如下URL访问codestriker,并在其中查看相关bugzilla信息以及svn代码review.

http://localhost/codestriker/codestriker.pl

关于svn提交代码时自动在codestriker中创建topic,需要根据实际情况修改svn参考conf目录下的post-commit.pl文件.若配置成功的话在提交代码时会有相关信息显示topic等.

至此codestriker+subversion+bugzilla的集成环境配置完毕.

 

 

 

 


TAG:

 

评分:0

我来说两句

Open Toolbar