I found the description of RunWrapper.getBuildVariables a bit incomplete/confusing:
> for a non-Pipeline downstream build, offers access to a map of defined build variables; for a Pipeline downstream build, any variables set globally on env
so I suggest changing it, appending:
> Child Pipeline jobs can use this to report additional information to the parent job by setting variables in <code>env</code>. Note that build parameters are not shown in buildVariables.