[英]How to integrate Hudson and MantisBT
Hudson is a popular CI system, Mantis is a popular Bug Tracking system. Hudson是流行的CI系统, Mantis是流行的Bug跟踪系统。
I have a list of project in Mantis and I would like to import into Hudson in order to build specific project . 我在螳螂中有一个项目清单, 我想导入到哈德森以建立特定的项目 。
In othet words, I configured a parametric job which accept the project name from a choice list, then the job connect the svn repository and check out it. 换句话说,我配置了一个参数化作业,该作业从选择列表中接受项目名称,然后该作业连接svn存储库并检出它。 I woul like to choose the project from mantis project list.
我想从螳螂项目清单中选择项目。
Is it possible and How? 有可能吗?如何?
as pointed by Robert it is a little bit complex, because the mantsiBT uses local database; 正如Robert所指出的,这有点复杂,因为mantsiBT使用本地数据库。 to do you can use the Extended choice parameter which get data from a properties file or url, than you can the following page into the mantisbt home directory:
为此,您可以使用扩展选择参数 ,该参数从属性文件或url获取数据,然后可以将以下页面放入mantisbt主目录:
<?php
require_once ('core.php');
$link = mysql_connect($g_hostname, $g_db_username, $g_db_password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
if (!mysql_select_db('bugtracker')) {
die('Could not select database: ' . mysql_error());
}
$result1 = mysql_query('SELECT name FROM bugtracker.mantis_project_table');
if (!$result1) {
die('Could not query:' . mysql_error());
} else {
echo 'projects=';
for ($j = 0; $j < mysql_num_rows($result1); ++$j) {
$vv0 = mysql_result($result1, $j, 0);
if ($j == 0) {
echo $vv0;
} else {
echo ',' . $vv0;
}
}
}
echo "\r\n";
mysql_close($link);
?>
and it works for me. 它对我有用。
In the extended choice plugin 在扩展选择插件中
Single Select
Single Select
page url of mantisbt
just defined into the file parameter page url of mantisbt
的page url of mantisbt
设置为file参数 projects
projects
设置属性键
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.