【问题标题】:email publisher for cruisecontrol.netCruisecontrol.net 的电子邮件发布者
【发布时间】:2015-03-17 12:07:46
【问题描述】:

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

我一定是做错了什么,因为即使我已经很好地定义了组并且每个人都收到了异常电子邮件。

下面是显示我当前结构的代码段。这个 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>

【问题讨论】:

    标签: email configuration cruisecontrol.net


    【解决方案1】:

    您让 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> 
    

    【讨论】:

    • 感谢您的回复。我希望 buildmaster 能收到所有的电子邮件。但是,我不希望开发、质量检查等收到异常的电子邮件。我将运行一个测试,看看当我为 buildmaster 指定“异常”时会发生什么。也许这会触发一些事情。
    • 如果 buildmaster 应该获取所有邮件,在通知元素中包含所有类型,对于其他类型相同,除了 'Exception' 类型,应该得到你想要的结果
    • 这仍然是一个问题,尽管对此有所不同。每当构建出现异常时,通常是因为连接到 SVN 服务器时出现故障,尽管列出了各个组和用户的成功、失败等,但电子邮件仍会发送给每个人。感谢那些试图在这里提供提示的人。
    猜你喜欢
    • 2010-11-05
    • 1970-01-01
    • 2011-02-18
    • 2010-10-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多