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

Pass parameters from master job to joining job

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • join-plugin
    • None
    • Platform: All, OS: All

      When the joining job executes, it does not have access to the caller's
      environment. This makes it "impossible", for example, to have a parameterized
      job trigger a joining job and have the latter use user input (work arounds could
      involve writing and reading to file on a shared drive).

      The Parameterized Trigger Plugin allows calling subjobs while passing in the
      caller's arguments. The same could most probably be implemented when calling the
      joining job.

          [JENKINS-3959] Pass parameters from master job to joining job

          nado18 added a comment -

          It appears relevant code from the Parameterized Trigger plugin is on lines 49-54
          (revision 19295) of this file

          https://svn.dev.java.net/svn/hudson/trunk/hudson/plugins/parameterized-trigger/src/main/java/hudson/plugins/parameterizedtrigger/PredefinedPropertiesBuildTriggerConfig.java

          public class PredefinedPropertiesBuildTriggerConfig extends BuildTriggerConfig
          ...
          public void trigger(...)
          {
          ...
          if (includeCurrentParameters)
          {
          ParametersAction action = build.getAction(ParametersAction.class);
          if (action != null)

          { values.addAll(action.getParameters()); }

          }
          ...
          }
          ...
          }

          nado18 added a comment - It appears relevant code from the Parameterized Trigger plugin is on lines 49-54 (revision 19295) of this file https://svn.dev.java.net/svn/hudson/trunk/hudson/plugins/parameterized-trigger/src/main/java/hudson/plugins/parameterizedtrigger/PredefinedPropertiesBuildTriggerConfig.java public class PredefinedPropertiesBuildTriggerConfig extends BuildTriggerConfig ... public void trigger(...) { ... if (includeCurrentParameters) { ParametersAction action = build.getAction(ParametersAction.class); if (action != null) { values.addAll(action.getParameters()); } } ... } ... }

          mdonohue added a comment -

          move to 'join' subcomponent

          mdonohue added a comment - move to 'join' subcomponent

          mdonohue added a comment -

          fixed

          mdonohue added a comment - fixed

          mdonohue added a comment -

          Fixed in version 1.3 of the join plugin

          mdonohue added a comment - Fixed in version 1.3 of the join plugin

            mdonohue mdonohue
            nado18 nado18
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: