I am trying to use the new multistage yaml pipelines to download an artifact from a specific build. The DownloadBuildArtifacts@0 task has an output variable for BuildNumber that I would like to reference further on, but I can't figure out how to access it.
In the GUI for the task there is a box that let's you set a reference name

But from the yaml pipeline definition I can't figure out how access this variable.
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'specific'
project: 'Sandbox'
pipeline: 'bash-testing'
buildVersionToDownload: 'latest'
downloadType: 'single'
artifactName: 'someArtifactName'
referenceNames: 'blahblah'
- bash: echo $BLAHBLAH_BUILDNUMBER
Simply outputs

