Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8590

Adding Matrix support for Email-Ext

    XMLWordPrintable

Details

    Description

      Hi currently in matrix project, emails are sent for every MatrixRun. I want to add an option for matrix projects in order to enable an email to be send for parent project only/Matrix run / both

      Attachments

        Activity

          sashas83 sashas83 created issue -
          sashas83 sashas83 made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          sashas83 sashas83 added a comment -

          This is a patch for 2.10 version

          sashas83 sashas83 added a comment - This is a patch for 2.10 version
          sashas83 sashas83 made changes -
          Attachment email-ext-slaves.patch [ 20172 ]
          ashlux ashlux made changes -
          Assignee sashas83 [ sashas83 ] ashlux [ ashlux ]
          ashlux ashlux added a comment -

          I haven't had a chance to take a look at this yet but I did apply the patch to a branch: https://github.com/ashlux/email-ext-plugin/tree/jenkins-8590-matrix-support.

          ashlux ashlux added a comment - I haven't had a chance to take a look at this yet but I did apply the patch to a branch: https://github.com/ashlux/email-ext-plugin/tree/jenkins-8590-matrix-support .
          sashas83 sashas83 added a comment -

          Hi ashlux, do you have plans on upstreaming the change to major release ?
          Thanks, Regards Sasha.

          sashas83 sashas83 added a comment - Hi ashlux, do you have plans on upstreaming the change to major release ? Thanks, Regards Sasha.
          abayer Andrew Bayer added a comment -

          sashas83, could you fork the github repo and try a pull request?

          abayer Andrew Bayer added a comment - sashas83, could you fork the github repo and try a pull request?
          davec davec added a comment -

          I was able to merge in the changes from the above referenced ashlux branch into the most recent 2.15 version with 3 minor conflicts. I can confirm that patch works to allow only a single e-mail from the parent node (and an option to specify all configurations or both parent and all configurations).

          Unfortunately when using the parent e-mail only, tthe e-mail does not contain any of the build log information from each configuration and requires a visit to the jenkins build page to see which configurations actually failed followed by several clicks to dig down to the build logs.

          I think a better approach would be to allow all individual e-mails from each configuration to be aggregated into a single e-mail that contains all of the information from each individual configuration.

          We have a large number of configurations that we perform integration builds on via a Matrix project. Getting bombarded with 20 e-mails because of a typo or missing prototype which causes the build to fail on large numbers of configurations is a little bit overkill. Generating a single e-mail with an aggregation of what would have been the individual e-mails is ideal.

          Since this suggestion is not the same as this ticket, I'm going to create a separate request ticket for this functionality.

          That said, thanks for posting the patch as it definitely helps clean up the barrage of e-mails we are getting even if it means we have to do a few more cumbersome clicks to get to the configuration failure information and logs.

          davec davec added a comment - I was able to merge in the changes from the above referenced ashlux branch into the most recent 2.15 version with 3 minor conflicts. I can confirm that patch works to allow only a single e-mail from the parent node (and an option to specify all configurations or both parent and all configurations). Unfortunately when using the parent e-mail only, tthe e-mail does not contain any of the build log information from each configuration and requires a visit to the jenkins build page to see which configurations actually failed followed by several clicks to dig down to the build logs. I think a better approach would be to allow all individual e-mails from each configuration to be aggregated into a single e-mail that contains all of the information from each individual configuration. We have a large number of configurations that we perform integration builds on via a Matrix project. Getting bombarded with 20 e-mails because of a typo or missing prototype which causes the build to fail on large numbers of configurations is a little bit overkill. Generating a single e-mail with an aggregation of what would have been the individual e-mails is ideal. Since this suggestion is not the same as this ticket, I'm going to create a separate request ticket for this functionality. That said, thanks for posting the patch as it definitely helps clean up the barrage of e-mails we are getting even if it means we have to do a few more cumbersome clicks to get to the configuration failure information and logs.
          sashas83 sashas83 added a comment -

          Hi sorry for not replying for a long time. I just switched 2 month jobs and did not have a chance to look at the message. I`m not sure whether this made to the patch, but the idea was that if your build configuration fails last 30 lines of the log will be attached, i remember that there was some jelly file that you could edit and add logs to the body of the email.

          sashas83 sashas83 added a comment - Hi sorry for not replying for a long time. I just switched 2 month jobs and did not have a chance to look at the message. I`m not sure whether this made to the patch, but the idea was that if your build configuration fails last 30 lines of the log will be attached, i remember that there was some jelly file that you could edit and add logs to the body of the email.

          This would be a great bonus. Receiving dozens and dozens of emails for matrix job is really spam...

          Considering the fact that a patch is already available, could someone pull this?

          Thanks.

          ccaraivan Costin Caraivan added a comment - This would be a great bonus. Receiving dozens and dozens of emails for matrix job is really spam... Considering the fact that a patch is already available, could someone pull this? Thanks.
          tyrael Ferenc Kovacs added a comment -

          I would also need this, could we merge what we currently have?
          Of course anybody is welcome to come up with a better solution (having the aggragated configuration build results in the parent mail), but we can add that later.
          Thanks!

          tyrael Ferenc Kovacs added a comment - I would also need this, could we merge what we currently have? Of course anybody is welcome to come up with a better solution (having the aggragated configuration build results in the parent mail), but we can add that later. Thanks!

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
          src/main/java/hudson/plugins/emailext/MatrixTriggerMode.java
          src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java
          src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.jelly
          src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/help-matrixTriggerMode.html
          src/main/resources/hudson/plugins/emailext/Messages.properties
          src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherMatrixTest.java
          src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/906d076cb12443c5d1087e62ec428027e7a410de
          Log:
          [FIXED JENKINS-8590] added option for controlling the firing for
          MatrixProject.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java src/main/java/hudson/plugins/emailext/MatrixTriggerMode.java src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.jelly src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/help-matrixTriggerMode.html src/main/resources/hudson/plugins/emailext/Messages.properties src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherMatrixTest.java src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java http://jenkins-ci.org/commit/email-ext-plugin/906d076cb12443c5d1087e62ec428027e7a410de Log: [FIXED JENKINS-8590] added option for controlling the firing for MatrixProject.
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          dogfood dogfood added a comment -

          Integrated in plugins_email-ext #92
          [FIXED JENKINS-8590] added option for controlling the firing for

          Kohsuke Kawaguchi :
          Files :

          • src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
          • src/main/resources/hudson/plugins/emailext/Messages.properties
          • src/main/java/hudson/plugins/emailext/MatrixTriggerMode.java
          • src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/help-matrixTriggerMode.html
          • src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
          • src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.jelly
          • src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
          • src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherMatrixTest.java
          • src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java
          dogfood dogfood added a comment - Integrated in plugins_email-ext #92 [FIXED JENKINS-8590] added option for controlling the firing for Kohsuke Kawaguchi : Files : src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java src/main/resources/hudson/plugins/emailext/Messages.properties src/main/java/hudson/plugins/emailext/MatrixTriggerMode.java src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/help-matrixTriggerMode.html src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.jelly src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherMatrixTest.java src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 138701 ] JNJira + In-Review [ 188115 ]

          People

            ashlux ashlux
            sashas83 sashas83
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: