Email notification - Notify Developer they broke the build?

Answered

Hi there,

Is there a simple way to notify the developer via email that they broke a build? Currently the configuration team is notified, but we would like to include the developer in the email as well, either in the TO field or CC.

Is there a simple way to do this? Or is a plugin required?

Thanks :)

Edited by: Hewie on Nov 18, 2008 9:02 AM

0
11 comments
Avatar
Permanently deleted user

I know that individual developers can configure their email notifier to tell them if they've broken the build.

What would be nice for a Sys Admin is to be able to specify a notification policy that overrides individuals' settings. The policy can be as simple as an option that says "always email person who broke the build using username@company-name.com"

Hussain

0
Avatar
Permanently deleted user

Yep, that's a similar idea to what I would like to do... The developer will commit changes which is linked to their username, and that username correlates to their email address, so I figure it's not hard to link the "bad" commit to an email...

As an administrator of TeamCity I would like to dictate who has access to the site and the users that are notified when the build changes from good to bad, or bad to good, rather than the developer logging in and electing to watch a build and be notified when it's broken - assuming that's how it currently works?

0
Avatar
Permanently deleted user

We've written a plugin to do this. You should do the same - it's easy and gives you complete control over what to put in the email.

Regards,
Hussain

1
Avatar
Permanently deleted user

@ Hussain Almusaad,

Can you please give me a details on this plug in? I'm in need of this.

Thanks,

Kavitha

0

Hi Kavitha,

This functionality is implemented in the latest TeamCity versions. You can subscribe to notifications "affected by your changes". For more details please see the section: https://confluence.jetbrains.com/display/TCD9/Subscribing+to+Notifications#SubscribingtoNotifications-SubscribingtoNotifications.

0
Avatar
Permanently deleted user

Hi Alina,

I know that everyone has to configure the email notification in team city in order to receive the email. 

I would like to include the details in the email that whose change has broken the build. Is there a way to do this? Please help.

Thanks,

Kavitha

 

 

0

Kavitha,

You can configure notification rules for groups in TeamCity. For example for group "All Users" you can create notification rule: "Build with my changes" - Build fails (Ignore failures not caused by my changes).
In this case, if someone from the group broke the build, only he/she will receive a notification. Is it what you are looking for?

It's not possible to add information about "who broke the build" into the notification template. Please vote for the requests: https://youtrack.jetbrains.com/issue/TW-5054, https://youtrack.jetbrains.com/issue/TW-17585.
As of now you can include the list of committers in the email, see an example of the ftl.

0
Avatar
Permanently deleted user

I agree. This is a generic solution for the need.

What i am looking is when the build fails, failure notification will be sent to the distribution list. In that email, we need to highlight whose change has broken the build. Is it possible by any way?

 

 

0

Currently you can list all committers (as I noted in my previous comment) or all changes included in the build. Use 

teamcity.notification.maxChangesNum

property to configure max number of changes to list in e-mail message (integer, default 10).
Unfortunately currently it's not possible to determine whose change broke the build.

0

Hello - I'm currently searching for the same thing. Is there a simple way to do this today?

0

Hello Milagros,

This task still requires you to solve two problems - first of all, you need to identify whose change was the breaking one, and secondly, you need to send an email to the change author. The second part got easier in 2023.05 - now you may use service messages to send a custom email to any address of your choice.

However, the first problem remains topical - in particular because there is no easy way to programmatically tell which change was the breaking one. Sometimes, the build breaks in non-trivial ways so even human users do require a lot of time to tell which change was the cause of the issue. You may retrieve a list of all changes associated with the build via REST API during the build, but the analysis is still up to you.

To retrieve all changes associated with the build, you may use the following REST API request:

/app/rest/builds?locator=id:<build ID here>&fields=build(id,changes(change(*)))
 
1

Please sign in to leave a comment.