One way to do this is with the Parameterized Trigger plugin: https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin
This allows you to run another task using, but not limited to:
* a set of predefined properties * properties from a properties file read from the workspace of the triggering build * the parameters of the current build
With Build A, B, and C, you set th3m up as parameterized assemblies (i.e., request a value for the parameter). This option is next to the top of the job configuration page. For example, to take a parameter, you call MY_ID . Now it is available as $ MY_ID in assembly A.
Now, when you create A an, it requests MY_ID. Then add the build step to Job A to start โBโ with the parameters and pass all the parameters of assembly A to it. Now in assembly B there will also be the parameter $ MY_ID that was set when you started assembly A.
source share