downstream job unable to access default jenkins variable
Downstream job is not able access BUILD_NUMBER from default JenkinsSetEnvironmentVariables
Based on the following .ci.yml
plugins:
- downstream_job:
on_result: SUCCESS
foo/bar:
VERSION: <% out<< printf("%06d", BUILD_NUMBER.toInteger()) << "-" << DOTCI_SHA.substring(0,10) %>
BRANCH: master
Resulted in null per attached output from foo/bar

Aside from groovy script, I don't see any way to compute values to pass dynamic variable to build parameters since bash commands will not work outside of the build run section.
Also confirmed Downstream job is not able to pass the default String Parameter values that a job may have configured ...
For example job/foo/job/bar/configured with IMAGE default as "mysql" and TAG default as "5.7"

but its invocation via downstream results in the following console error output
$ docker pull $IMAGE:$TAG
instead of the following console output when invoked manually (i.e. not downstream job)
$ docker pull mysql:5.7
sorry for bringing this back from the shadows, have you found a way to work around this issue?
I stumbled upon this because I have to dynamically generate a var in a build and pass it to the downstream job (unfortunately I can't directly use the parameterized trigger build plugin for this purpose)