使用单个配置文件在 CC.NET 中进行电子邮件组配置
我们已经开始使用 CC.NET 进行持续集成,随着监控项目数量的增加,我希望通过单个配置文件配置电子邮件警报。
我的意思是,我希望在一个配置文件中包含不同组中的用户列表,该配置文件由所有项目配置文件引用:
<user name="user1" group="buildmasters" address="[email protected]"/>
<user name="user2" group="internalapplications" address="[email protected]"/>
<user name="user3" group="internalapplications" address="[email protected]"/>
<user name="user4" group="externalapplications" address="[email protected]"/>
<user name="user5" group="externalapplications" address="[email protected]"/>
然后项目配置文件将引用正确的组:
<group name="internalapplications" notification="change"/>
因此对于不同的组作为内部应用程序的项目我将导入单个配置文件,然后设置内部应用程序组。 我还想为所有事情添加构建管理员,以便现在我可以跟踪人们是否遇到问题。
这意味着我希望有两个或多个组中的用户,但我不知道这是否可能:
<user name="user1" group="buildmaster, externalapplications" address="[email protected]"/>
我一直在假设有一天我可以配置它并且只有一个文件所有用户的电子邮件地址,但今天我已经去做了,但我不确定它是否能像这样工作。
谁能描述一下他们是如何解决这个问题的?
We have started using CC.NET for continuous integration and as the number of projects monitored builds up I would like configure the email alerts via a single config file.
What I mean by this is that I would like to have a list of the users in different groups in a single config file that is referenced by ALL the project configuration files:
<user name="user1" group="buildmasters" address="[email protected]"/>
<user name="user2" group="internalapplications" address="[email protected]"/>
<user name="user3" group="internalapplications" address="[email protected]"/>
<user name="user4" group="externalapplications" address="[email protected]"/>
<user name="user5" group="externalapplications" address="[email protected]"/>
Then the project configuration file will reference the correct group:
<group name="internalapplications" notification="change"/>
So for the different projects that are internal applications I would import the single config file then set the internal applications group. I would also like to add buildmasters for everything so that for now I can keep track of people if they are having problems.
This would mean I'd like to have a user in two or more groups for example but I don't know if it's possible:
<user name="user1" group="buildmaster, externalapplications" address="[email protected]"/>
I've been working under the assumption that one day I could configure this and have just a single file with all the users email addresses in, but today I've gone to do it and I'm not sure it works like this.
Can anyone describe how they have approached this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你想要做的是使用
我制作的 CC.Net 配置预处理器 email.config
并在需要的地方包含它...
What you want to do is use CC.Net Configuration Preprocessor
I made an email.config
and included it where needed...
采取稍微不同的方法怎么样?
通过电子邮件服务器管理组并将邮件发送到组别名。
这样,在不同的组中拥有相同的用户就很简单,而且如果组成员身份发生变化,您不需要更改配置文件。
使用 Exchange 执行此操作非常简单,不了解其他电子邮件系统。
How about taking a slightly different approach.
Manage the groups through your e-mail server and send mails to the group alias.
That way it's trivial to have the same users in different groups, plus you shouldn't need to change your config files if the group membership changes.
Doing this with Exchange is pretty easy, don't know about other e-mail systems.