Like lavoizer mentioned, the example does not work.
Fixed it for you:
variables:
someName: someValue
stages:
- stage: stage_deploy
displayName: Production
jobs:
- job: job_deploy_infrastructure
displayName: Deploy Some Infrastructure
steps:
- bash: |
SOMEVALUE="bleh"
echo "##vso[task.setvariable variable=someName;isOutput=true;]$SOMEVALUE"
echo "variable value is $(someName)"
name: setVariable
- job: job_deploy_code
displayName: Deploy Some Code
dependsOn: ['job_deploy_infrastructure']
variables:
someName: $[ dependencies.job_deploy_infrastructure.outputs['setVariable.someName'] ]
steps:
- bash: |
echo "the variable value is $(someName)"