I have to store the value of $pipeline.variables.res.value in new variable in release pipeline and then have to use that new variable in rest of the stages and tasks in release pipeline. I'm working with classic pipelines. I'm trying below code:
Set-Variable -Name abc -Value $pipeline.variables.res.value
Write-Host "New Value:" $abc
Write-Host "##vso[task.setvariable variable=xyz;isoutput=true]$abc"
Write-Host "New Value:" $abc
Output: Not able to see any xyz variable in release pipeline. Also, on calling below commands in different tasks, I'm not getting any value as an output.
Input: Write-Host "New Value:" $xyz
Write-Host "New Value:" $abc
Output:2022-09-19T09:04:56.4561806Z New Value:
2022-09-19T09:04:56.4594657Z New Value:
Please help in this.
