Azure pipeline Variables between tasks
Hey, Im really struggling with variables between tasks and hope to find some help.
I have one powershell task which parse a yaml file, and extract a variable. This variable im setting like this: Write-Host("##vso[task.setvariable variable=APPLICATION_NAME;isOutput=true]$tempApplicationName")
where $tempApplicationName holds the parsed yaml variable im looking for. I have debugged it to make sure it has value.
In the next task, I have a Kubernetes task, which takes inputs:
- task: Kubernetes@0 condition: succeeded() displayName: "Waiting for rollout" inputs: connectionType: Kubernetes Service Connection kubernetesServiceEndpoint: ${{parameters.kubernetesServiceEndpoint}} namespace: ${{parameters.namespace}} command: rollout arguments: status deployment/$(APPLICATION_NAME) -n ${{parameters.namespace}}
Resource I been looking at: https://medium.com/microsoftazure/how-to-pass-variables-in-azure-pipelines-yaml-tasks-5c81c5d31763
${{ variables['APPLICATION_NAME'] }} // which is compile time, so i know it wont work $(variables['APPLICATION_NAME']) // Runtime but never worked either
Any ideas?
[link] [comments]

