I have several jobs which use this plugin. They are configured to run another job upon success or failure of the parent job. The parent job runs a shell script build step. If the job succeeds the downstream job is triggered correctly. If the job fails, though, no downstream job is triggered and nothing in the console log indicates what the problem is.

          [JENKINS-8758] Trigger doesn't fire on failed jobs

          Owen Mehegan added a comment -

          I just did some more experimenting and figured out more specifically what the problem is.

          If you create two triggers for the same job, one for the pass case and one for the fail case, only the first one will ever work. For example if we set up triggers like this:

          Build A passes
          Run Build B with param="Yay"
          Build A fails
          Run Build B with param="Oh no!"

          Only the passing case will ever work. If Job A fails, nothing will happen. If we happen to swap the two, and define the failure case first, then that will always work and the pass case will never trigger.

          Multiple passing triggers of DIFFERENT jobs always work.

          Owen Mehegan added a comment - I just did some more experimenting and figured out more specifically what the problem is. If you create two triggers for the same job, one for the pass case and one for the fail case, only the first one will ever work. For example if we set up triggers like this: Build A passes Run Build B with param="Yay" Build A fails Run Build B with param="Oh no!" Only the passing case will ever work. If Job A fails, nothing will happen. If we happen to swap the two, and define the failure case first, then that will always work and the pass case will never trigger. Multiple passing triggers of DIFFERENT jobs always work.

          btrim added a comment -

          reproduced with 2.4 on Jenkins 1.396 running on Mac OS X 10.6.6, java 1.6.0_22

          btrim added a comment - reproduced with 2.4 on Jenkins 1.396 running on Mac OS X 10.6.6, java 1.6.0_22

          Jorge Vargas added a comment -

          The root cause for this is JENKINS-8073 and it seems to be the same bug. I have had problem with both "forms of the bug"

          Jorge Vargas added a comment - The root cause for this is JENKINS-8073 and it seems to be the same bug. I have had problem with both "forms of the bug"

          Kay Abendroth added a comment -

          Is there a workaround for this particular problem?

          We have a job that fails a lot and then doesn't trigger other jobs that run testcases.

          Kay Abendroth added a comment - Is there a workaround for this particular problem? We have a job that fails a lot and then doesn't trigger other jobs that run testcases.

          Kay Abendroth added a comment -

          Trigger parameterized build on other projects on failed builds (with Trigger always) only works for me, if parameters are set, e.g. a pre-defined parameter PARA=null.

          Kay Abendroth added a comment - Trigger parameterized build on other projects on failed builds (with Trigger always ) only works for me, if parameters are set, e.g. a pre-defined parameter PARA=null .

          Owen Mehegan added a comment -

          I had to create two jobs with different names, which do almost the same thing, and call one on pass and the other on fail. That works. The bug is that you can't have two triggers of the same job, one for pass and one for fail.

          Owen Mehegan added a comment - I had to create two jobs with different names, which do almost the same thing, and call one on pass and the other on fail. That works. The bug is that you can't have two triggers of the same job, one for pass and one for fail.

          Owen Mehegan added a comment -

          Resolved by JENKINS-8985 as far as I know.

          Owen Mehegan added a comment - Resolved by JENKINS-8985 as far as I know.

            huybrechts huybrechts
            owenmehegan Owen Mehegan
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: