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

Cannot trigger more than one instance of the same job

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • P. Trigger: 2.4, Hudson: 1.384, win xp, java 1.6

      I've been trying to use the parametrized trigger plugin in a Hudson job parent=P to start two instances of a second Hudson job child=C using different parameters.

      I was expecting that in case of a successful build of P, both instances of job C would be triggered. However, only one instance of C gets started.

          [JENKINS-8073] Cannot trigger more than one instance of the same job

          davidkarlsen added a comment -

          Same problem here

          davidkarlsen added a comment - Same problem here

          maxence added a comment -

          Same issue here. Note that this has not always been the case, this used to work just fine.

          I've rolled back the plugin to 2.2 and mutiple instances do get scheduled, but the parameter values are completely messed up unfortunately.

          maxence added a comment - Same issue here. Note that this has not always been the case, this used to work just fine. I've rolled back the plugin to 2.2 and mutiple instances do get scheduled, but the parameter values are completely messed up unfortunately.

          Jorge Vargas added a comment -

          This is also happening to me. However my case is more complicated. We have a "Notify" job which all jobs use to do some custom notifications (email, irc, etc) we use a pre-hudson script that does all of this for us. Therefore we have the following.

          Job P, executes Notify as well as Job C, and Job C executes Notify also.

          And Job C is never triggered.

          We also had the same problem as the OP with calling Notify with different parameters based on the status of the build.

          Jorge Vargas added a comment - This is also happening to me. However my case is more complicated. We have a "Notify" job which all jobs use to do some custom notifications (email, irc, etc) we use a pre-hudson script that does all of this for us. Therefore we have the following. Job P, executes Notify as well as Job C, and Job C executes Notify also. And Job C is never triggered. We also had the same problem as the OP with calling Notify with different parameters based on the status of the build.

          Jorge Vargas added a comment -

          For the record downgranding to 2.2 didn't fix it for me.

          Jorge Vargas added a comment - For the record downgranding to 2.2 didn't fix it for me.

          Rob Petti added a comment -

          This looks like it's related to the new method for triggering downstream builds using the Dependency Graph. It seems like the ParameterizedDependency objects are considered the same only if they have the same project, so only one instance of it in the graph is actually run.

          Overriding the 'equals' and 'hashCode' functions to account for the additional differences (specifically the 'config' object that contains the parameters) allows multiple instances to be run when they are at different levels of the graph (eg, Job A executes Job B and Job C, and Job B executes C again with different params). I have yet to figure out how to get them to run when you have the same project being triggered multiple times from one project (eg, Job A executes Job B twice with different params).

          Rob Petti added a comment - This looks like it's related to the new method for triggering downstream builds using the Dependency Graph. It seems like the ParameterizedDependency objects are considered the same only if they have the same project, so only one instance of it in the graph is actually run. Overriding the 'equals' and 'hashCode' functions to account for the additional differences (specifically the 'config' object that contains the parameters) allows multiple instances to be run when they are at different levels of the graph (eg, Job A executes Job B and Job C, and Job B executes C again with different params). I have yet to figure out how to get them to run when you have the same project being triggered multiple times from one project (eg, Job A executes Job B twice with different params).

          Owen Mehegan added a comment -

          Resolved by JENKINS-8985. I verified that this works now in Jenkins 1.426 with Parameterized Trigger plugin version 2.11.

          Owen Mehegan added a comment - Resolved by JENKINS-8985 . I verified that this works now in Jenkins 1.426 with Parameterized Trigger plugin version 2.11.

            huybrechts huybrechts
            ktetzlaff ktetzlaff
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: