In the code below, I have a variable (storage_account_name
) being output in the first job, within the task called TaskName
. I want to be able to retrieve its value in a second job (deployment job), but the variable is empty.
jobs:
- job: dependency
steps:
- template: my_template.yml
- deployment: my_deployment
environment: MyEnvironment
dependsOn:
- dependency
variables:
- name: storage_account_name
value: $[ dependencies.dependency.outputs['TaskName.storage_account_name'] ]
strategy:
runOnce:
deploy:
steps:
- checkout: self
- template: another_template.yml
parameters:
TF_VAR_storage_account_name: $(storage_account_name)
The exact same code works well when the second job is a normal job. Any idea what I am doing wrong?