【问题标题】:CruiseControl.net - configuration of users / email at server levelCruiseControl.net - 服务器级别的用户/电子邮件配置
【发布时间】:2013-02-04 14:44:36
【问题描述】:

我们在 CruiseControl.net 中配置了大约 50 个项目,每个项目都单独配置为在完成/更改/任何事情时发送电子邮件。

有没有办法在更高级别(例如服务器)配置用户/电子邮件地址列表?我搜索了文档,并搜索了任何线索,但我找不到任何东西。

我需要更新谁收到了电子邮件,更新 50 个文件不是一个可持续或理想的解决方案!

谢谢。

【问题讨论】:

    标签: email cruisecontrol.net publisher


    【解决方案1】:

    我不确定这是否是您的确切情况,但也可能对您有用。我已将所有电子邮件设置分离到单独的文件中,然后在项目配置中使用包含。

    所以它看起来像这样:

    文件:EmailPublisher.xml

    <cb:config-template xmlns:cb="urn:ccnet.config.builder">
    <email from="notification@example.com" mailhost="mailhost.example.com" mailport="587" includeDetails="true" mailhostUsername="username" 
            mailhostPassword="mailPwd" useSSL="TRUE" replyto="admin@example.com">       
    
            <description>Sending email notifications</description>
        <groups>
            <group name="developers">
              <notifications>
                <notificationType>Failed</notificationType>
                <notificationType>Fixed</notificationType>
              </notifications>
            </group>
            <group name="buildmaster">
              <notifications>
                <notificationType>Always</notificationType>
              </notifications>
            </group>
        </groups>
    
        <converters>
            <regexConverter find="$" replace="@example.com" />
        </converters>
    
        <modifierNotificationTypes>
            <NotificationType>Failed</NotificationType>
            <NotificationType>Fixed</NotificationType>
        </modifierNotificationTypes>    
    </email>
    </cb:config-template>
    

    然后在发布者部分的项目配置中:

    <!-- email publisher -->
    <cb:include href="EmailPublisher.xml"/>
    

    缺点是您需要为每个项目进行相同的配置,或者使用多个包含文件(这又开始导致同样的问题)。

    无论如何,它似乎对我们的团队很有效。

    [编辑] 您还可以更进一步,例如仅包含来自单独文件的用户列表,并将通知设置单独应用于项目。

    【讨论】:

      【解决方案2】:

      您可以像这样使用变量/替换:$(admins)、$(programmers)、$(ProductAScrumMaster)、$(ProductBEntireTeam)、$(HolyCrapTheMachineFriedEmailEveryone) 等。如果您需要组合,您也可以附加或嵌套它们。

      这篇文章作为一个例子可能更有用 - 它有更多细节:Using dynamic parameters in email publisher subjectSettings block with CruiseControl.Net

      【讨论】:

        猜你喜欢
        • 2013-11-13
        • 1970-01-01
        • 2013-11-21
        • 2019-01-24
        • 2013-12-23
        • 2011-08-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多