tcPrettyEmail update for TeamCity 6.5.x

5 10 2011

A recent comment from Julien pointed out that tcPrettyEmail messages with Test results are not printing corerctly.

It turns out that the TestBean in the TeamCity API was removed, and I was using that to glean the test detail.  In version 0.8.24.121, I’ve worked around that by building my own bean and passing that to the template engine.

WARNING: This release is only compatible with TeamCity 6.5 and later. For Teamcity 6.0 and earlier, please use the earlier versions.

Screenshot: http://tcplugins.sourceforge.net/screenshot/tcPrettyEmail
Download: http://tcplugins.sourceforge.net/files/tcPrettyEmail
Documentation: http://sourceforge.net/apps/trac/tcplugins/wiki/TcPrettyEmail

If you find a bug or have feature request, please post a comment below or on the tcPrettyEmail bugs page.

Advertisement

Actions

Information

9 responses

2 11 2011
Ingo

Hello Wolf,

I’m using TC Version 6.5.2 (build 17935). With the build-in e-mail notifications everything runs fine. Now I want to use your plugin “tcPrettyEmail”, the version is 0.8.24.121. The plugin is installed correctly according to TC’s “Administration -> Server Configuration -> External plugins” list.

I added the following XML-Code to main-config.xml (and modified the settings for my SMTP-server):

The problem is, that I don’t get an E-Mail. Maybe there’s a bug in your plugin.

By the way, does your plugin use the rules of TC for e-mail notification?

Regards,
Ingo

2 11 2011
Ingo

UPDATE:
since XML-tags don’t work, here are the setting without the ‘pretty-mail’ and ‘smtp’-tags:

host=”mail.company.com” port=”25″ username=”mySmtpUsername” password=”mySmtpPassword” from-address=”friendly.name@company.com” from-name=”Friendly Name”

2 11 2011
netwolfuk

Hi Ingo.
The tcPrettyEmailer has its own rules in the “My Settings & Tools” page. If you go to “My Settings & Tools” in TeamCity you should see a section for “Pretty Email Notifier”. You need to set your notification settings in there for the tcPrettyEmailer plugin.
You should see some logging appear in the teamcity-server.log file on your teamcity server when the plugin sends email.

30 12 2011
Devender

Hi,

I’m trying to add PrettyEmail plugin to my Teamcity setup but not receiving any emails after a successful build. Already added rules to Pretty Email Notifier in My Settings. On looking server log, I found following error -

jetbrains.buildServer.SERVER – PrettyEmailNotificator :: Could not assemble the BuildSuccessful prettyemail for bt2 See DEBUG output and/or STDOUT for Stacktrace
org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource ‘email-BuildSuccessful.vm’
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:458)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:341)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:813)
at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:470)
at prettyemailer.teamcity.PrettyEmailMimeMessageHelper.generateEmail(PrettyEmailMimeMessageHelper.java:45)
at prettyemailer.teamcity.PrettyEmailNotificator.doNotifications(PrettyEmailNotificator.java:220)
at prettyemailer.teamcity.PrettyEmailNotificator.notifyBuildSuccessful(PrettyEmailNotificator.java:116)
at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener$NotificatorEventAdapter.buildSuccessful(UserRulesAwareNotificationListener.java:135)
at jetbrains.buildServer.notification.impl.UserRulesAwareNotificationListener.buildSuccessful(UserRulesAwareNotificationListener.java:27)
at jetbrains.buildServer.notification.NotificationProcessor$3.call(NotificationProcessor.java)
at jetbrains.buildServer.notification.NotificationProcessor$16.run(NotificationProcessor.java:7)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Could you please suggest how can this error be resolved?

Thanks,
Devender

30 12 2011
netwolfuk

Hi Deveneder.

It appears your teamcity is not finding the velocity templates.
Which TeamCity version are you running?
Which TeamCity install type are you using (Windows, WAR FIle, Unix, etc).
What OS are you using?

31 12 2011
Devender

Hi,

I’m using TeamCity Professional 6.5.6. It’s been installed on windows server 2008. Please suggest where I can find these templates or/and which additional configuration I need to perform to make it working.

Thanks for your response!

Devender

3 01 2012
netwolfuk

Hi Devender.
I have prepared a zip file containing just the templates and images.
You can download it from here: http://sourceforge.net/projects/tcplugins/files/tcPrettyEmail_plugin/templates/tcPrettyEmailPlugin-0.8.26.123-templates.zip/download

Unzip that on your server. Then set the templates and/or images location in the config file as per the documentation here: http://sourceforge.net/apps/trac/tcplugins/wiki/TcPrettyEmail

4 01 2012
Devender

Hi,

Thanks for sending templates and images! I got it working yesterday before receiving your response. I had to do following steps to make it work -

1. From the folder- \.BuildServer\plugins\.unpacked\tcPrettyEmailPlugin-0.8.24.121\server, I extracted tcPrettyEmail-0.8.24.121-jar-with-dependencies.jar using WinRAR. Then from folder buildServerResources, got img and templates folders.

2. Copied img and templates folders to my Teamcity folder in C:\

3. Updated path of img and templates in main-config.xml

4. Restarted Teamcity service.

Then i received a very pretty email about my build status :) . It’s very nice looking and provides very useful contents.

Many thanks to you for providing this plugin and your help to make it work !!

Regards,
Devender

6 01 2012
netwolfuk

Well done. And thanks for your kind feedback.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.