配置 CC.NET 电子邮件通知和在仪表板中显示错误日志

发布于 2024-09-26 11:38:04 字数 1519 浏览 6 评论 0原文

我正在尝试配置 CC.NET 以发送电子邮件通知。我在谷歌上搜索了很多相关内容,也找到了一些例子,但是通过使用这些例子,我无法弄清楚实际问题发生在哪里。

下面是我在配置文件中使用它的代码块:

<publishers>
        <statistics />
        <xmllogger logDir="c:\TestCC\buildlogs" />
        <email from="[email protected]" mailhost="smtp.gmail.com" mailport="587" useSSL="TRUE" mailhostUsername="[email protected]" includeDetails="TRUE" >
            <users>
                <user name="Radha" group="buildmaster" address="[email protected]" />
                <user name="Mehul" group="developers" address="[email protected]" />
            </users>
            <groups>
                <group name="developers" notifications="always" />
                <group name="buildmaster" notifications="always" />
            </groups>
        </email>
    </publishers>

上面的配置正在 CC.NET 配置验证器中传递。如何从头开始配置?如果构建失败,我还想在仪表板中显示错误日志。我正在使用 nant 脚本来构建文件。

I'm trying to configure CC.NET to send email notifications. I have googled a lot about it and found examples also but by using those examples I'm not able to figure out where the actual problem is occuring.

Below is the block of code I'm using it in config file:

<publishers>
        <statistics />
        <xmllogger logDir="c:\TestCC\buildlogs" />
        <email from="[email protected]" mailhost="smtp.gmail.com" mailport="587" useSSL="TRUE" mailhostUsername="[email protected]" includeDetails="TRUE" >
            <users>
                <user name="Radha" group="buildmaster" address="[email protected]" />
                <user name="Mehul" group="developers" address="[email protected]" />
            </users>
            <groups>
                <group name="developers" notifications="always" />
                <group name="buildmaster" notifications="always" />
            </groups>
        </email>
    </publishers>

The above config is passing in CC.NET config validator. How to configure it from scratch? I also want to show error logs in the Dashboard if the build is failing. I'm using nant script for building files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九公里浅绿 2024-10-03 11:38:04

您可以在此处找到电子邮件发布器的文档:http://confluence.public。 Thoughtworks.org/display/CCNET/Email+Publisher
它是最新的并且解释了很多。

从我在您的配置块中看到的情况来看,它缺少 mailhostPassword。从 CC.net 1.4 开始,通知必须声明如下:

<group name="developers"> 
  <notifications>
    <notificationType>Always</notificationType>
  </notifications>
</group>

关于仪表板和电子邮件的内容,您可以通过修改仪表板.config 和 ccservice.exe.config 中的 xsl 文件列表来编辑它。更多信息请参见:

Cruise Control .Net 未显示 Nant 构建错误

希望这有帮助

编辑
我认为你的conf看起来像这样(使用gmail smtp):

<publishers>
    <statistics />
    <xmllogger />
    <email from="[email protected]" mailhost="smtp.gmail.com" mailport="587" useSSL="TRUE" mailhostUsername="[email protected]" includeDetails="TRUE" mailhostPassword="YourGmailP@ssword" >
        <users>
            <user name="Radha" group="buildmaster" address="[email protected]" />
            <user name="Mehul" group="developers" address="[email protected]" />
        </users>
        <groups>
            <group name="developers">
              <notifications>
                <notificationType>Always</notificationType>
              </notifications>
            </group>
            <group name="buildmaster">
              <notifications>
                <notificationType>Always</notificationType>
              </notifications>
            </group>
        </groups>
    </email>
</publishers>

如果你的公司有一个smtp服务器,假设MailServerName第一行应该是

<email from="[email protected]" mailhost="MailServerName" mailhostUsername="[email protected]" mailhostPassword="YourCompanyMailP@ssword" includeDetails="TRUE" >

>

You have the documentation for the email puiblisher here : http://confluence.public.thoughtworks.org/display/CCNET/Email+Publisher
It is up-to-date and explains a lot.

From what I see in your configuration block, it lacks the mailhostPassword. And since CC.net 1.4 the notifications must be declared as follow :

<group name="developers"> 
  <notifications>
    <notificationType>Always</notificationType>
  </notifications>
</group>

Concerning the content of the dashboard and email, you can edit it by modifying the list of xsl files in dashboard.config and ccservice.exe.config. More information here :

Cruise Control .Net not showing Nant build errors

Hope this helps

EDIT
I think your conf would look like that (with gmail smtp) :

<publishers>
    <statistics />
    <xmllogger />
    <email from="[email protected]" mailhost="smtp.gmail.com" mailport="587" useSSL="TRUE" mailhostUsername="[email protected]" includeDetails="TRUE" mailhostPassword="YourGmailP@ssword" >
        <users>
            <user name="Radha" group="buildmaster" address="[email protected]" />
            <user name="Mehul" group="developers" address="[email protected]" />
        </users>
        <groups>
            <group name="developers">
              <notifications>
                <notificationType>Always</notificationType>
              </notifications>
            </group>
            <group name="buildmaster">
              <notifications>
                <notificationType>Always</notificationType>
              </notifications>
            </group>
        </groups>
    </email>
</publishers>

if you have a smtp server in your company, let's say MailServerName the first line should be

<email from="[email protected]" mailhost="MailServerName" mailhostUsername="[email protected]" mailhostPassword="YourCompanyMailP@ssword" includeDetails="TRUE" >

>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文