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.

Accessing a triggered build reports in a velocity template #3665

benprim ·
Dear All,

I tried to access the getReports() on a triggered build in a velocity template but it looks like the collection is empty.
Here's my code

#if ($step.class.simpleName.contains("TriggerBuildStep") && $step.failed)
#set($triggeredBuild=$system.buildManager.load($step.runtime.customData))
<BR>FOUND TRIGGERED BUILD ! $triggeredBuild.getVersion() reports ? $triggeredBuild.getReports().size() <BR>
#end


But then size returns 0
Is there a way to access it ?
Thanks a lot
Ben
  • replies 2
  • views 1706
  • stars 0
robinshen ADMIN ·
reports data will not be persisted into database, so it will not work this way. A workaround is not add some step in triggered build to write down reports to some form of file, and then read it from that file in triggering build.
benprim ·
Thanks Robin,
In the end I added a step in the "parent" configuration to publish the triggered configuration files as well.