codeStriker(及與svn、bugzilla集成)使用過程記錄
codeStriker使用過程介紹
參考資料:
一、 服務器端的安裝
2、 下載完后,直接解壓到目錄下(D:"codestriker-1.9.8)
3、 建議參考D:"codestriker-1.9.8"html" codestriker.pdf 進行配置,這個文檔說得比較詳細;
4、 創建數據庫,以mysql為例:
C:">mysql -uroot -p
mysql>CREATE DATABASE codestrikerdb;
mysql>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, REFERENCES ON codestrikerdb.* TO codestriker@localhost IDENTIFIED BY 'cspasswd';
mysql>FLUSH PRIVILEGES;
4、 配置你的codestriker主要修改D:"codestriker-1.9.8"codestriker.conf
以mysql數據庫為例,配置如下:
$db = 'DBI:mysql:dbname=codestrikerdb';
$dbuser = 'codestriker';
$dbpasswd = 'cspasswd';
配置你的發送email地址:
$mailuser = 'your_email_adress';
$mailpasswd = ' your_email_password';
5、 配置Source Code Hightlighting:
安裝highlight-setup-2.7.exe,并修改D:"codestriker-1.9.8"html" codestriker.conf如下:
$highlighter = 'D:/Program Files/WinHighlight/highlight.exe';
6、 跟svn集成配置如下:
@valid_repositories =
(
'svn:file:///D:/svnroo',
);
$repository_name_map =
{
'svn:http://localhost/svn;svn_username;svn_userpassword' => 'ProjectName Subversion'
};
注:http://localhost/svn 這個是你svn在apache里配置的url。
7、與bugzilla集成配置如下,即你bugzilla的數據庫信息:
$bug_db_host = 'localhost';
$bug_db_name = 'bugs';
$bug_db_password = 'bugs_password';
$bug_db_dbname = 'bugs';
8、 與apache集成配置如下:
<Directory "D:/codestriker-1.9.8/cgi-bin/">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
SetHandler cgi-script
</Directory>
<Directory "D:/codestriker-1.9.8/html/">
AllowOverride None
Allow from all
</Directory>
ScriptAlias /codestriker/ "D:/codestriker-1.9.8/cgi-bin/"
Alias /codestrikerhtml/ "D:/codestriker-1.9.8/html/"
配置基本完成,在瀏覽器打開http://localhost/codestriker/codestriker.pl,即可瀏覽。
二、 使用
創建一個topic(如圖1):
三、 與svn、bugzilla集成(修改svn代碼,提交后,自動創建toptic,并與相應的bug關聯)
post-commit-codestriker.pl 放在D:"codestriker-1.9.8"bin目錄下,并修改此文件如下:
根據如上配置信息,創建reviewers.txt文件,及內容如下:
注:這個值是你在創建project(創建project的url: http://localhost/codestriker/codestriker.pl?action=create_project)后在創建toptic的頁面(創建topic的url:http://localhost/codestriker/codestriker.pl?action=create)上Project的選項
值,如果是第二個選項就是2。
然后,在你svn的倉庫根目錄下的hooks目錄,創建一個適合你操作系統的批處理文件,以windows為例:post-commit.bat,其內容如下:
set REPOS=%1
set REV=%2
D:/codestriker-1.9.8/bin/post-commit-codestriker.pl %REPOS% %REV%
配置完成,啟動svn服務器(相關命令:svnserve -d -r D:"svnroo)和apache服務器,在svn客戶端,修改文件,提交到svn服務器,就會自動生成一個topic(打開這個url可以查看到),并在bugzilla里的相應bug里看到相應comment。
注:提交代碼的格式必須如下,因為這是我post-commit-codestriker.pl定義的格式:
Bug 1:
注釋
1就是你在bugzilla里,想關聯的bug號。
posted on 2009-04-03 09:30 w@ns0ng 閱讀(3799) 評論(0) 編輯 收藏 所屬分類: J2EE