Hi Brantone,

Thank you very much for looking into this!
We need this functionality more and more.

I would use this as follows:

  1. We have a Template Job name "Template_Job"
    • This Job defines parameter "PARAMETER1", "PARAMETER2" and "PARAMETER3"
  2. We have several Jobs, name MyJob1, MyJob2, MyJob3, ...
    • All of these Jobs use "Template_Job"
    • These Jobs import one or more of the parameters from the template job.

I suggest the most flexible way to use the parameters from the "Template_Job" (in e.g. "MyJob1") is:

  1. Select "This build is parameterised"
  2. "Add Parameter" -> "Use parameter from another Job" (this would be the new part)
  3. "Select" parameter name
    • When performing a manual build, I suggest it should be possible to obtain all required parameter info from the "Template_Job" configuration.
      (We should see the same parameter info as when the parameters would be configured in "MyJob1" directly)

Note: One difficult part may be recursion:
Suppose we have:

  1. Template Job "Template_Job1" and "Template_Job2"
    • These are simple template jobs
    • "Template_Job1" defines parameter "PARAMETER1_1", "PARAMETER1_2" and "PARAMETER1_3"
    • "Template_Job2" defines parameter "PARAMETER2_1", "PARAMETER2_2" and "PARAMETER2_3"
  2. Template Job "Template_JobX"
    • This Job uses parameters, build steps, post build steps, etc. from "Template_Job1" and "Template_Job2"
    • E.g. Using parameters "PARAMETER1_1" and "PARAMETER1_2" from "Template_Job1"
    • E.g. Using parameters "PARAMETER2_2" and "PARAMETER2_3" from "Template_Job2"
  3. Actual main Job "MyJob1"
    • Using parameters from "Template_JobX"
    • E.g. Using parameters "PARAMETER1_1" and "PARAMETER1_2" from "Template_JobX" (which actually came from "Template_Job1")
    • E.g. Using parameters "PARAMETER2_2" from "Template_JobX" (which actually came from from "Template_Job2")
    • E.g. Additionally using parameter "PARAMETER1_3" from "Template_Job1"

If this is too complex too implement, it can be simplified:

  1. Template Job configuration same as shown above.
  2. Actual main Job "MyJob1"
    • E.g. (Directly) using parameters "PARAMETER1_1", "PARAMETER1_2" and "PARAMETER1_3" from "Template_Job1"
    • E.g. (Directly) using parameters "PARAMETER2_2" and "PARAMETER2_3" from "Template_Job2"

I hope this helps you figuring out the design.

with best regards,
Tom.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to