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

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

    XMLWordPrintable

Details

    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

          slide_o_mix Alex Earl added a comment -

          What about the improvement trigger?

          slide_o_mix Alex Earl added a comment - What about the improvement trigger?
          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?

          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?
          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.

          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.
          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.

          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.
          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.

          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.
          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.

          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.
          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...

          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...

          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.

          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.
          slide_o_mix Alex Earl added a comment -

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

          slide_o_mix Alex Earl added a comment - Added new Building trigger for the transition from Failure to Unstable.
          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)?

          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)?
          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).

          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).
          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).

          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).
          slide_o_mix Alex Earl added a comment -

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

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

          People

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

            Dates

              Created:
              Updated:
              Resolved: