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

trigger parameterized builds only triggers the first instance of a project

      Configure Job A to trigger Job B twice, with differing parameters. Only the first instance of Job B will be triggered.

      Eg.

      Job A has two triggers:
      Job B, predefined parameter BRANCH=master
      Job B, predefined parameter BRANCH=testbranch

      When Job A finishes building, it will trigger Job B with BRANCH=master, but it will not trigger it a second time with BRANCH=testbranch, as required.

          [JENKINS-8985] trigger parameterized builds only triggers the first instance of a project

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/hudson/plugins/parameterizedtrigger/ParameterizedDependency.java
          http://jenkins-ci.org/commit/parameterized-trigger-plugin/d22c7383bde9a497ab5b4740164334052c88e7db
          Log:
          [FIXED JENKINS-8985] Allow multiple ParameterizedDependencys for upstream:downstream.

          Override equals and hashCode in ParameterizedDependency - Dependency's
          equals and hashCode methods only pay any attention to the upstream and
          downstream projects, which means that until now, if you had multiple
          ParameterizedDependencys between the same upstream/downstream
          projects, only the first would actually get added.

          However, to actually have multiple triggers between the same projects
          work, this depends on a related fix in Jenkins core, which should be
          live in 1.414.

          Compare: https://github.com/jenkinsci/parameterized-trigger-plugin/compare/401af57...d22c738

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/plugins/parameterizedtrigger/ParameterizedDependency.java http://jenkins-ci.org/commit/parameterized-trigger-plugin/d22c7383bde9a497ab5b4740164334052c88e7db Log: [FIXED JENKINS-8985] Allow multiple ParameterizedDependencys for upstream:downstream. Override equals and hashCode in ParameterizedDependency - Dependency's equals and hashCode methods only pay any attention to the upstream and downstream projects, which means that until now, if you had multiple ParameterizedDependencys between the same upstream/downstream projects, only the first would actually get added. However, to actually have multiple triggers between the same projects work, this depends on a related fix in Jenkins core, which should be live in 1.414. Compare: https://github.com/jenkinsci/parameterized-trigger-plugin/compare/401af57...d22c738

          dogfood added a comment -

          Integrated in jenkins_main_trunk #804
          JENKINS-8985 BuildTrigger modification to handle DependencyGroups.

          Andrew Bayer : 78c709e91329d4b4ba6f36f25a64412ade63c215
          Files :

          • core/src/main/java/hudson/tasks/BuildTrigger.java
          • core/src/main/java/hudson/model/DependencyGraph.java
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #804 JENKINS-8985 BuildTrigger modification to handle DependencyGroups. Andrew Bayer : 78c709e91329d4b4ba6f36f25a64412ade63c215 Files : core/src/main/java/hudson/tasks/BuildTrigger.java core/src/main/java/hudson/model/DependencyGraph.java changelog.html

          Kohsuke Kawaguchi added a comment - Also see one more follow up change at http://jenkins-ci.org/commit/jenkins/8910df0326090f8e941138b856bd18dd6bb2e61b

          Maik Richey added a comment -

          Just to be sure, it will be fixed in 1.415 then, right?

          Maik Richey added a comment - Just to be sure, it will be fixed in 1.415 then, right?

          Maik Richey added a comment -

          All right, I assume it is fixed as we are in 1.417 by now but the Parameterized Trigger Plugin is not updated yet. Could someone responsible please release the new version (2.9) of the Parameterized Trigger Plugin so this one could be verified and closed. Would be great, thanks.

          Maik Richey added a comment - All right, I assume it is fixed as we are in 1.417 by now but the Parameterized Trigger Plugin is not updated yet. Could someone responsible please release the new version (2.9) of the Parameterized Trigger Plugin so this one could be verified and closed. Would be great, thanks.

          dogfood added a comment -

          Integrated in plugins_parameterized-trigger #6
          [FIXED JENKINS-8985] Allow multiple ParameterizedDependencys for upstream:downstream.

          Andrew Bayer :
          Files :

          • src/main/java/hudson/plugins/parameterizedtrigger/ParameterizedDependency.java

          dogfood added a comment - Integrated in plugins_parameterized-trigger #6 [FIXED JENKINS-8985] Allow multiple ParameterizedDependencys for upstream:downstream. Andrew Bayer : Files : src/main/java/hudson/plugins/parameterizedtrigger/ParameterizedDependency.java

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          changelog.html
          core/src/main/java/hudson/model/DependencyGraph.java
          core/src/main/java/hudson/tasks/BuildTrigger.java
          http://jenkins-ci.org/commit/jenkins/78c709e91329d4b4ba6f36f25a64412ade63c215
          Log:
          JENKINS-8985 BuildTrigger modification to handle DependencyGroups.

          Pull individual Dependencys out of DependencyGroups we see in
          BuildTrigger.execute and make sure to actually kick those builds off
          as well, so that we can have two different dependencies (say, for
          different parameters) from one upstream project to a single downstream
          project.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: changelog.html core/src/main/java/hudson/model/DependencyGraph.java core/src/main/java/hudson/tasks/BuildTrigger.java http://jenkins-ci.org/commit/jenkins/78c709e91329d4b4ba6f36f25a64412ade63c215 Log: JENKINS-8985 BuildTrigger modification to handle DependencyGroups. Pull individual Dependencys out of DependencyGroups we see in BuildTrigger.execute and make sure to actually kick those builds off as well, so that we can have two different dependencies (say, for different parameters) from one upstream project to a single downstream project.

          this is more of a nit on the current output from the change. i have job A which triggers Job BuildNVR twice with differing predefined parameters. when Job A triggers the subordinate jobs the output is as such:

          14:52:15 Triggering a new build of BuildNVR #7
          14:52:15 Triggering a new build of BuildNVR #7

          i took this to indicate that only a single BuildNVR job (#7) would be triggered. jenkins did submit two jobs #7 and #8, but it would be nice if the output of job A were correct.

          william schilp

          william schilp added a comment - this is more of a nit on the current output from the change. i have job A which triggers Job BuildNVR twice with differing predefined parameters. when Job A triggers the subordinate jobs the output is as such: 14:52:15 Triggering a new build of BuildNVR #7 14:52:15 Triggering a new build of BuildNVR #7 i took this to indicate that only a single BuildNVR job (#7) would be triggered. jenkins did submit two jobs #7 and #8, but it would be nice if the output of job A were correct. william schilp

          okay, this is happening on a server with only 2 executors. we're planning on adding more excutors (when we buy some additional ram) and will see what happens with additional executors.

          bill

          william schilp added a comment - okay, this is happening on a server with only 2 executors. we're planning on adding more excutors (when we buy some additional ram) and will see what happens with additional executors. bill

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          changelog.html
          core/src/main/java/hudson/model/DependencyGraph.java
          core/src/main/java/hudson/tasks/BuildTrigger.java
          http://jenkins-ci.org/commit/jenkins/78c709e91329d4b4ba6f36f25a64412ade63c215
          Log:
          JENKINS-8985 BuildTrigger modification to handle DependencyGroups.

          Pull individual Dependencys out of DependencyGroups we see in
          BuildTrigger.execute and make sure to actually kick those builds off
          as well, so that we can have two different dependencies (say, for
          different parameters) from one upstream project to a single downstream
          project.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: changelog.html core/src/main/java/hudson/model/DependencyGraph.java core/src/main/java/hudson/tasks/BuildTrigger.java http://jenkins-ci.org/commit/jenkins/78c709e91329d4b4ba6f36f25a64412ade63c215 Log: JENKINS-8985 BuildTrigger modification to handle DependencyGroups. Pull individual Dependencys out of DependencyGroups we see in BuildTrigger.execute and make sure to actually kick those builds off as well, so that we can have two different dependencies (say, for different parameters) from one upstream project to a single downstream project.

            abayer Andrew Bayer
            evilchili evilchili
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: