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

Trigger doesn't fire on failed jobs

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Labels:
      None
    • Environment:
      Linux

      Description

      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.

        Issue Links

          Activity

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

          Show
          owenmehegan owenmehegan 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.
          Hide
          btrim 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

          Show
          btrim 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
          Hide
          jorgevargas 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"

          Show
          jorgevargas 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"
          Hide
          kay_abendroth 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.

          Show
          kay_abendroth 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.
          Hide
          kay_abendroth 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.

          Show
          kay_abendroth 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 .
          Hide
          owenmehegan owenmehegan 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.

          Show
          owenmehegan owenmehegan 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.
          Hide
          owenmehegan owenmehegan added a comment -

          Resolved by JENKINS-8985 as far as I know.

          Show
          owenmehegan owenmehegan added a comment - Resolved by JENKINS-8985 as far as I know.

            People

            • Assignee:
              huybrechts huybrechts
              Reporter:
              owenmehegan owenmehegan
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: