mailcontrol.net的电子邮件发布者

时间:2015-03-17 12:07:47

标签: email configuration cruisecontrol.net

我正在尝试配置我们的构建过程,以便构建异常只能通过电子邮件发送到构建管理器。

我必须做错事,因为即使我已经明确定义了这些组,每个人都会收到邮件的异常邮件。

以下是显示我当前结构的代码段。此emailconfig.xml文件将导入到我的项目中。在理解应该如何使用notificationType时,我是否缺少某些内容?谢谢。

<cb:config-template xmlns:cb="urn:ccnet.config.builder">
    <email from="$(MAIL_FROM)" mailhost="$(MAIL_HOST)" mailport="25" includeDetails="TRUE">
        <users>
            <user name="DevTeam" group="developers" address="ACDev@companyname.com"/>
            <user name="QA-OnPrem" group="QA" address="QA-OnPrem@companyname.com"/>
            <user name="BuildManagers" group="buildmaster" address="ACBuilds@companyname.com"/> 
            <user name="Some Name" group="BA" address="sname@companyname.com"/>
        </users>
        <groups>
            <group name="buildmaster">
                <notifications>
                    <notificationType>Always</notificationType>
                </notifications>
            </group>
            <group name="developers">
                <notifications>
                    <notificationType>Failed</notificationType>
                    <NotificationType>Success</NotificationType>
                    <NotificationType>Change</NotificationType>
                </notifications>
            </group>
            <group name="QA">
                <notifications>
                    <notificationType>Failed</notificationType>
                    <NotificationType>Success</NotificationType>
                    <NotificationType>Change</NotificationType>
                    <NotificationType>Fixed</NotificationType>
                </notifications>
            </group>
            <group name="BA">
                <notifications>
                    <notificationType>Change</notificationType>
                    <notificationType>Fixed</notificationType>
                </notifications>
            </group>
            <group name="PHITeam">
                <notifications>
                    <notificationType>Failed</notificationType>
                    <NotificationType>Success</NotificationType>
                    <NotificationType>Change</NotificationType>
                    <NotificationType>Fixed</NotificationType>
                </notifications>
            </group>
        </groups>
        <modifierNotificationTypes>
            <NotificationType>Failed</NotificationType>
            <NotificationType>Fixed</NotificationType>
            <NotificationType>Success</NotificationType>
            <NotificationType>Change</NotificationType>
            <NotificationType>Exception</NotificationType>
        </modifierNotificationTypes>
        <xslFiles>
            <file>xsl\header.xsl</file>
            <file>xsl\compile.xsl</file>
            <file>xsl\modifications.xsl</file>
        </xslFiles>
    </email>
</cb:config-template>

1 个答案:

答案 0 :(得分:0)

你让buildmaster接收所有邮件,还有修改器 下面是我使用的设置,那个很好用。它的群体比你少,但你会得到这个想法。

<cb:define name="email_publisher">
<email from="CruiseControl@xyz.com" 
      mailhost="mailserver" 
      includeDetails="TRUE">

    <users>
        <user name="Ruben Willems" group="buildmaster" address="ruben.willems@whatever.com" /> 
    </users>

    <groups>
        <group name="buildmaster" >
            <notifications>
                <NotificationType>Exception</NotificationType>
            </notifications>                
        </group>
    </groups> 


    <converters>
        <ldapConverter domainName="FortKnox" ldapQueryField="displayName" />
    </converters> 

    <modifierNotificationTypes>
       <NotificationType>Failed</NotificationType>
       <NotificationType>Fixed</NotificationType>
    </modifierNotificationTypes>

</email>