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

Send the "still unstable" email rather than the "unstable" email, when the previous status was fail, and the status before that was unstable.

    Details

    • Similar Issues:

      Description

      I'm using the email-ext plugin, with both "unstable" and "still unstable" triggers defined.

      Tests are failing, so my builds are unstable. The "still unstable" email is sent.
      Someone commits a change that causes a compile error, the build fails. The "failed" email is sent.
      Someone commits a fix for the compile error, the build goes back to unstable.

      The problem is that at this point, the "unstable" email is sent. It should be the "still unstable" email, since before the previous fail, the status was unstable. If we send the "unstable" email, it gives the impression that new failures were introducted in that build, which is not the case.

        Attachments

          Activity

          Hide
          mindless Alan Harder added a comment -

          makes sense.. also if there is an aborted build in the middle.

          Show
          mindless Alan Harder added a comment - makes sense.. also if there is an aborted build in the middle.
          Show
          farshidce farshidce added a comment - submitted a fix here : https://github.com/farshidce/email-ext-plugin/commit/22f6e1655b33049c686a98988cac32947de0d27f
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: farshidce
          Path:
          src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java
          http://jenkins-ci.org/commit/email-ext-plugin/22f6e1655b33049c686a98988cac32947de0d27f
          Log:
          fix for JENKINS-5411 to send "still unstable" email instead of unstable

          for cases when the previous build is failed or aborted we should
          send a still unstable email instead of simply stable
          to fix this issue made change to iterate through all the previous builds
          and find out whether all the prev builds are "fail" or "abort" or not.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: farshidce Path: src/main/java/hudson/plugins/emailext/plugins/content/BuildStatusContent.java http://jenkins-ci.org/commit/email-ext-plugin/22f6e1655b33049c686a98988cac32947de0d27f Log: fix for JENKINS-5411 to send "still unstable" email instead of unstable for cases when the previous build is failed or aborted we should send a still unstable email instead of simply stable to fix this issue made change to iterate through all the previous builds and find out whether all the prev builds are "fail" or "abort" or not.
          Hide
          mfriedenhagen Mirko Friedenhagen added a comment -

          Merged into master.

          Show
          mfriedenhagen Mirko Friedenhagen added a comment - Merged into master.
          Hide
          kutzi kutzi added a comment -

          BTW: as the IRC and Jabber plugins have a similar functionality, it would be nice to have the detection for 'still unstable' or failed builds in core.

          Show
          kutzi kutzi added a comment - BTW: as the IRC and Jabber plugins have a similar functionality, it would be nice to have the detection for 'still unstable' or failed builds in core.

            People

            • Assignee:
              farshidce farshidce
              Reporter:
              mwebber Matthew Webber
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: