如何整合Hudson和Mantisbt



hudson 是一个流行的CI系统, Mantis 是一个流行的错误跟踪系统。

我有一个项目列表和我想进口到哈德森,以构建特定的项目

在othet单词中,我配置了一个参数作业,该作业从选择列表中接受项目名称,然后将作业连接到SVN存储库并进行检查。我喜欢从螳螂项目列表中选择该项目。

可能吗?

如何

正如罗伯特(Robert)指向的那样,这有点复杂,因为mantsibt使用本地数据库。要使用扩展选择参数,该参数从属性文件或URL中获取数据,而不是以下页面进入Mantisbt Home目录:

<?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 "rn";
mysql_close($link);
?>

它对我有用。

在扩展选择插件中

  • 选择Single Select
  • page url of mantisbt设置为文件参数
  • 将属性密钥设置为projects

相关内容

最新更新