I have a function which will return a result. I am setting that result as an environment value in a pipeline. When I am invoking environment variable it's not printing the next two lines.
Write-Host "Before env : $result"
write-host "##vso[task.setvariable variable=message]$result"
[![enter code here][1]][1]
In other stage I invoked message other variable but it's not printing the next two lines.
write-host "After env : $(message)"
[![enter code here][2]][2]
My only challenge was not getting the last two lines which is ASDB_REPORT / ASDB_REPORT_TEST