CruiseControl.net - 在服务器级别配置用户/电子邮件

时间:2013-02-04 14:44:37

标签: email cruisecontrol.net publisher

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

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

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

感谢。

2 个答案:

答案 0 :(得分:1)

我不确定这是你的确切情况,但也可能适合你。我已将所有电子邮件设置分隔为单独的文件,然后使用项目配置中的include。

所以它看起来像这样:

文件: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"/>

缺点是您需要为每个项目配置相同的配置,或者使用多个包含文件(这会再次引起同样的问题)。

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

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

答案 1 :(得分:0)

您可以使用如下变量/替换:$(admins),$(程序员),$(ProductAScrumMaster),$(ProductBEntireTeam),$(HolyCrapTheMachineFriedEmailEveryone)等。如果需要组合,您也可以追加或嵌套它们。

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

相关问题