Is it possible to configure CruiseControl.NET to send an email to the user(s) that did modifications to a broken build by mapping their SVN username to the corresponding Active-Directory alias (hence retrieving the correct, updated email address).
Our SVN server is set-up to allow users of a certain Active-Directory group to read and commit changes: I don't want to have to maintain the CruiseControl.NET config every time a user gets added to our Programmers group in Active-Directory.
Thanks a开发者_JAVA技巧 lot!
Are you asking how to determine the email address of the latest committer? This is farily simple assuming that your user's subversion user names are the same as their (non-domain-qualified) AD user names. Since you're authenticating to svn using AD, I'm guessing you have this already.
To email committers in response to cc.net events, use the "modifierNotificationTypes" configuration block (in the "email" block) to define when they should be emailed, and use the "converters" block to tell cc.net how to convert the svn user name into an email address. This should be as simple as tacking on "@yourcompany.com", which can be accomplished with a "regexConverter". Here's an example that emails committers on failed builds and the first fixed build:
<email from="build@yourcompany.com"
mailhost="yourmailserver"
includeDetails="TRUE">
<users />
<groups />
<modifierNotificationTypes>
<NotificationType>Failed</NotificationType>
<NotificationType>Fixed</NotificationType>
</modifierNotificationTypes>
<converters>
<regexConverter find="$"
replace="@yourcompany.com" />
</converters>
</email>
Check out the cc.net documentation on the email publisher for more details on how the email block can be configured.
精彩评论