I have to update parameter values based on whether the xyz pipeline in project pqr is successful or pipeline abc in project pqr is successful.
That is
pipeline successful parameter value
abc aaa
xyz zzz
I am trying the below code in my pipeline but not successful
Powershell:
if ('$(pqr.abc.result)' -eq 'succeeded') {
Write-Host "abc in pqr succeeded"
Write-Host "Setting component directory to aaa"
Write-Host "##vso[task.setvariable variable=component]$(Build.SourcesDirectory)assetsaaa"
}
elseif ('$(pqr.xyz.result)' -eq 'succeeded')
{
Write-Host "xyz in pqr succeeded"
Write-Host "Setting component directory to zzz"
Write-Host "##vso[task.setvariable variable=component]$(Build.SourcesDirectory)assetszzz"
}