Continuum

Mail notification should be configurable to notify on every build

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.0
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    2

Description

Continuum currently always optimizes the number of mails it sends by only sending a mail if the state changes from ok to not ok or vice versa. It would be better if this is configurable to always send a mail for every build (for instance for a nightly build).

Activity

Hide
Jamie Flournoy added a comment -

This is the jar that includes the modified version of AbstractContinuumNotifier, in case you don't want to rebuild Continuum just to apply this change.

This jar gets built as "continuum-notifier-api-1.0.2.jar" in continuum-plexus-application/target/plexus-application/lib, and goes in apps/continuum/lib in an installed copy. I renamed it here just so it'll be obvious which jar is the one that you hand-installed vs. the ones that came from the original Continuum installation.

Show
Jamie Flournoy added a comment - This is the jar that includes the modified version of AbstractContinuumNotifier, in case you don't want to rebuild Continuum just to apply this change. This jar gets built as "continuum-notifier-api-1.0.2.jar" in continuum-plexus-application/target/plexus-application/lib, and goes in apps/continuum/lib in an installed copy. I renamed it here just so it'll be obvious which jar is the one that you hand-installed vs. the ones that came from the original Continuum installation.
Hide
Jamie Flournoy added a comment -

The attached diff and jar implement this functionality. I've only tested this with the MailContinuumNotifier but the change was made in the superclass so it should make each notifier (IRC, etc.) separately configurable. The diff is against 1.0.2 because I didn't want to install the latest snapshot just to get this and I had some intermittent test failures (build timeouts on a fast server?) that made me nervous about using the latest version of the code.

To make the MailContinuumNotifier always send notifications even if the status is the same, install the jar in apps/continuum/lib directory, remove (or gzip) your continuum-notifier-api-1.0.2.jar (I called mine continuum-notifier-api-1.0.2-ORIG.jar.gz), and edit apps/continuum/conf/application.xml:

In <components>, in the <component> whose <implementation> contains org.apache.maven.continuum.notification.mail.MailContinuumNotifier, in <configuration>, add this:
<notifyEvenIfStateUnchanged>true</notifyEvenIfStateUnchanged >

To test it, just force a build for an app that is already building successfully, and you should see an email.

Show
Jamie Flournoy added a comment - The attached diff and jar implement this functionality. I've only tested this with the MailContinuumNotifier but the change was made in the superclass so it should make each notifier (IRC, etc.) separately configurable. The diff is against 1.0.2 because I didn't want to install the latest snapshot just to get this and I had some intermittent test failures (build timeouts on a fast server?) that made me nervous about using the latest version of the code. To make the MailContinuumNotifier always send notifications even if the status is the same, install the jar in apps/continuum/lib directory, remove (or gzip) your continuum-notifier-api-1.0.2.jar (I called mine continuum-notifier-api-1.0.2-ORIG.jar.gz), and edit apps/continuum/conf/application.xml: In <components>, in the <component> whose <implementation> contains org.apache.maven.continuum.notification.mail.MailContinuumNotifier, in <configuration>, add this: <notifyEvenIfStateUnchanged>true</notifyEvenIfStateUnchanged > To test it, just force a build for an app that is already building successfully, and you should see an email.
Hide
Emmanuel Venisse added a comment -

DUPLICATE with CONTINUUM-322

Show
Emmanuel Venisse added a comment - DUPLICATE with CONTINUUM-322
Hide
Ammar Hasan added a comment -

Hellos

I am having the same issue but the workaround works only for 1.0.2 but I have 1.0.3 installed. So replacing the jar didn't work in my case.
Can this change be done in the UI. I think this requirement is very common to have mail sent always.

Thanks
Ammar

Show
Ammar Hasan added a comment - Hellos I am having the same issue but the workaround works only for 1.0.2 but I have 1.0.3 installed. So replacing the jar didn't work in my case. Can this change be done in the UI. I think this requirement is very common to have mail sent always. Thanks Ammar

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: