Hudson is a popular CI system, Mantis is a popular Bug Tracking system.
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. 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; 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:
<?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
page url of mantisbt
just defined into the file parameter projects
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.