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

Parameters are not sent to down stream projects in maven2 jobs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      After updating to 1.353 of Hudson and the 2.3 version of the Parameterized Trigger Plugin, predefined Parameters specified in "Trigger parameterized build on other projects" do not get sent to the downstream job if the upstream job is of the maven2 type. The job is triggered, but the default parameters are used.

      This issue does not appear to affect free-style projects.

      See attachment for screen shot

        Attachments

          Activity

          Hide
          herque herque added a comment -

          Narrowed this down to an issue in the dependency graph implementation. It appears that the dependency created from the maven2 job is not being mapped properly. The BuildTrigger.perform is called, but after returning true, the ParameterizedDependency.shoudlTriggerBuild is not called. I'm assuming that the Dependency.shouldTriggerBuild is being called, which just returns true, so the job is performed, but without any of the parameters that the ParameterizedDependency.shouldTriggerBuild creates.

          At this point I'm not so sure it is an issue with the plugin... Hudson core seems to be casting the obj incorrectly for some reason, but I haven't found this code yet.

          Show
          herque herque added a comment - Narrowed this down to an issue in the dependency graph implementation. It appears that the dependency created from the maven2 job is not being mapped properly. The BuildTrigger.perform is called, but after returning true, the ParameterizedDependency.shoudlTriggerBuild is not called. I'm assuming that the Dependency.shouldTriggerBuild is being called, which just returns true, so the job is performed, but without any of the parameters that the ParameterizedDependency.shouldTriggerBuild creates. At this point I'm not so sure it is an issue with the plugin... Hudson core seems to be casting the obj incorrectly for some reason, but I haven't found this code yet.
          Hide
          herque herque added a comment -

          I figured out the issue, the maven code is using the downstreamProject.scheduleBuild() instead of the dependency graph code. This means that the build gets scheduled, but doesn't actually get any parameters passed in. I modified the plugin locally so that it pretends any maven builds are pre 1.341 by checking to see if the class is of the maven type. This causes it to use the old method and work with maven2.

          Show
          herque herque added a comment - I figured out the issue, the maven code is using the downstreamProject.scheduleBuild() instead of the dependency graph code. This means that the build gets scheduled, but doesn't actually get any parameters passed in. I modified the plugin locally so that it pretends any maven builds are pre 1.341 by checking to see if the class is of the maven type. This causes it to use the old method and work with maven2.
          Hide
          porterhouse91 porterhouse91 added a comment -

          I am also experiencing this issue on Hudson v1.355 and I would love to see this fixed. I see that there is a temporary fix available, but I was wondering if there was a more permanent solution.

          Show
          porterhouse91 porterhouse91 added a comment - I am also experiencing this issue on Hudson v1.355 and I would love to see this fixed. I see that there is a temporary fix available, but I was wondering if there was a more permanent solution.
          Hide
          dtriphaus dtriphaus added a comment -

          Same issue here, also Hudson 1.355 and 1.356, also had a look inside the code and herque is right with his researches. Fixed it temporary like herque.

          Show
          dtriphaus dtriphaus added a comment - Same issue here, also Hudson 1.355 and 1.356, also had a look inside the code and herque is right with his researches. Fixed it temporary like herque.
          Hide
          herque herque added a comment -

          For all those interested in a permanent fix, I created JENKINS-6274 in the maven component to move job scheduling to the dependency graph architecture. So follow/vote for this issue to be updated.

          Show
          herque herque added a comment - For all those interested in a permanent fix, I created JENKINS-6274 in the maven component to move job scheduling to the dependency graph architecture. So follow/vote for this issue to be updated.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/plugins/parameterized-trigger/src/main/java/hudson/plugins/parameterizedtrigger/BuildTrigger.java
          http://jenkins-ci.org/commit/33360
          Log:
          [parameterized-trigger] [FIXED JENKINS-6141] Maven plugin currently does not
          use DependencyGraph to trigger downstream jobs so parameters were lost when
          the upstream job is a maven project. Now excluding maven projects from
          DependencyGraph handling, until JENKINS-6274 is implemented.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/plugins/parameterized-trigger/src/main/java/hudson/plugins/parameterizedtrigger/BuildTrigger.java http://jenkins-ci.org/commit/33360 Log: [parameterized-trigger] [FIXED JENKINS-6141] Maven plugin currently does not use DependencyGraph to trigger downstream jobs so parameters were lost when the upstream job is a maven project. Now excluding maven projects from DependencyGraph handling, until JENKINS-6274 is implemented.

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              herque herque
            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: