Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Get variable from triggered build #4156

nini10 ·

Hi,

Is it possible to get variable value from triggered build?

For example, build 1 in configuration A triggers build 2 in configuration B. When build2 done, build1 need to get one of variable value from build2.

If it possible, could you please provide example code?

Thanks

  • replies 1
  • views 462
  • stars 1
robinshen ADMIN ·

This can be achieved with below script:

groovy:
def triggeredBuildId = steps.get("theTriggeringStep").runtime.customData
system.buildManager.load(triggeredBuildId).getVarValue("varName")