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

New Trigger: broken build -> compiling build (unstable/stable)

    Details

    • Similar Issues:

      Description

      I am wanting a new trigger that will send emails on the transition from a broken build (red orb) to a compiling build (yellow or blue orb). This would let us know that a build has been fixed but not necessarily that all tests are currently passing. Unfortunately the Fixed trigger does not meet this requirement as it would send an email on the transition from yellow to blue orbs (not desired), and misses the transition from red to yellow orbs.

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          What about the improvement trigger?

          Show
          slide_o_mix Alex Earl added a comment - What about the improvement trigger?
          Hide
          calculu5 calculu5 added a comment -

          My understanding is that the improvement trigger would include the transition from yellow to blue (not desired in this case, too much noise). My use case is to notify users of broken builds (done and configured) and to send an email when the build is compiling again. People should not be getting mail that test x is now fixed (and thus improved), but would rather know that the build they broke previously is now fixed. Or have I misunderstood the improvement trigger?

          Show
          calculu5 calculu5 added a comment - My understanding is that the improvement trigger would include the transition from yellow to blue (not desired in this case, too much noise). My use case is to notify users of broken builds (done and configured) and to send an email when the build is compiling again. People should not be getting mail that test x is now fixed (and thus improved), but would rather know that the build they broke previously is now fixed. Or have I misunderstood the improvement trigger?
          Hide
          slide_o_mix Alex Earl added a comment -

          So, just to make sure I am clear. You consider fixed to be when the compile is working, but not necessarily when the tests are all running? This would indeed be a new trigger. Once the script triggers are in place, you would be able to use those to define your own logic like this.

          Show
          slide_o_mix Alex Earl added a comment - So, just to make sure I am clear. You consider fixed to be when the compile is working, but not necessarily when the tests are all running? This would indeed be a new trigger. Once the script triggers are in place, you would be able to use those to define your own logic like this.
          Hide
          calculu5 calculu5 added a comment -

          Sorry I used the term 'fixed' even though there is already a Fixed trigger with its own semantics. Yes, I mean 'when the compile is working.' My trigger would be from when the build is broken to when it is compiling again.

          Show
          calculu5 calculu5 added a comment - Sorry I used the term 'fixed' even though there is already a Fixed trigger with its own semantics. Yes, I mean 'when the compile is working.' My trigger would be from when the build is broken to when it is compiling again.
          Hide
          slide_o_mix Alex Earl added a comment -

          I'm not sure how I can tell that the "compile" is working since the build steps can be pretty much ANY shell script, batch file, etc that could be running.

          Show
          slide_o_mix Alex Earl added a comment - I'm not sure how I can tell that the "compile" is working since the build steps can be pretty much ANY shell script, batch file, etc that could be running.
          Hide
          calculu5 calculu5 added a comment -

          Could you tell the color of the orbs? As per my initial post, can the trigger be made from red to (yellow or blue). For example, in the context of the Failure trigger, it will be triggered from (blue to red) or (yellow to red). I agree "compile" might not be the right term as the build steps can be anything.

          Show
          calculu5 calculu5 added a comment - Could you tell the color of the orbs? As per my initial post, can the trigger be made from red to (yellow or blue). For example, in the context of the Failure trigger, it will be triggered from (blue to red) or (yellow to red). I agree "compile" might not be the right term as the build steps can be anything.
          Hide
          slide_o_mix Alex Earl added a comment -

          It's the transition from the result Failure -> Unstable that I think you are looking for. Where Failure denotes the compile issue and Unstable denotes the build is compiling (not failing) but there are test failures. I think this should be doable (though you could do it with the script triggers I recently added), I just need to come up with a good name...

          Show
          slide_o_mix Alex Earl added a comment - It's the transition from the result Failure -> Unstable that I think you are looking for. Where Failure denotes the compile issue and Unstable denotes the build is compiling (not failing) but there are test failures. I think this should be doable (though you could do it with the script triggers I recently added), I just need to come up with a good name...
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/plugins/trigger/BuildingTrigger.java
          src/main/resources/hudson/plugins/emailext/plugins/trigger/Messages.properties
          src/test/java/hudson/plugins/emailext/plugins/trigger/BuildingTriggerTest.java
          src/test/java/hudson/plugins/emailext/plugins/trigger/FirstFailureTriggerTest.java
          src/test/java/hudson/plugins/emailext/plugins/trigger/NthFailureTriggerTestBase.java
          src/test/java/hudson/plugins/emailext/plugins/trigger/SecondFailureTriggerTest.java
          src/test/java/hudson/plugins/emailext/plugins/trigger/TriggerTestBase.java
          http://jenkins-ci.org/commit/email-ext-plugin/3ea1848751f762f26674c7a8d92023bbe59d4117
          Log:
          Fixed JENKINS-17546

          Added new trigger BuildingTrigger that is triggered on the transition
          from Failure to Unstable.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/plugins/trigger/BuildingTrigger.java src/main/resources/hudson/plugins/emailext/plugins/trigger/Messages.properties src/test/java/hudson/plugins/emailext/plugins/trigger/BuildingTriggerTest.java src/test/java/hudson/plugins/emailext/plugins/trigger/FirstFailureTriggerTest.java src/test/java/hudson/plugins/emailext/plugins/trigger/NthFailureTriggerTestBase.java src/test/java/hudson/plugins/emailext/plugins/trigger/SecondFailureTriggerTest.java src/test/java/hudson/plugins/emailext/plugins/trigger/TriggerTestBase.java http://jenkins-ci.org/commit/email-ext-plugin/3ea1848751f762f26674c7a8d92023bbe59d4117 Log: Fixed JENKINS-17546 Added new trigger BuildingTrigger that is triggered on the transition from Failure to Unstable.
          Hide
          slide_o_mix Alex Earl added a comment -

          Added new Building trigger for the transition from Failure to Unstable.

          Show
          slide_o_mix Alex Earl added a comment - Added new Building trigger for the transition from Failure to Unstable.
          Hide
          calculu5 calculu5 added a comment -

          Thanks. Quick questions. What is the trigger for the transition from Failure -> Successful (so I can configure the other part of my request)? Also, is there documentation on the script triggers (e.g. variables that can be used)?

          Show
          calculu5 calculu5 added a comment - Thanks. Quick questions. What is the trigger for the transition from Failure -> Successful (so I can configure the other part of my request)? Also, is there documentation on the script triggers (e.g. variables that can be used)?
          Hide
          slide_o_mix Alex Earl added a comment -

          Should be the Fixed trigger. I haven't added docs to the wiki, but there is documentation inside the configuration pages for each trigger (see the help icon next to the trigger).

          Show
          slide_o_mix Alex Earl added a comment - Should be the Fixed trigger. I haven't added docs to the wiki, but there is documentation inside the configuration pages for each trigger (see the help icon next to the trigger).
          Hide
          calculu5 calculu5 added a comment -

          The description for the Fixed trigger says: "An email will be sent when the build status changes from "Failure" or "Unstable" to "Successful"."

          This sounds like it would trigger on the "there are some tests failing" to "there are no tests failing" (not desired) in addition to the "Failure" to "Successful" transition (which is what I am looking for).

          Show
          calculu5 calculu5 added a comment - The description for the Fixed trigger says: "An email will be sent when the build status changes from "Failure" or "Unstable" to "Successful"." This sounds like it would trigger on the "there are some tests failing" to "there are no tests failing" (not desired) in addition to the "Failure" to "Successful" transition (which is what I am looking for).
          Hide
          slide_o_mix Alex Earl added a comment -

          You could filter in the pre-send script if you want.

          Show
          slide_o_mix Alex Earl added a comment - You could filter in the pre-send script if you want.

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              calculu5 calculu5
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: