Hi All I'm working on ymal release pipeline where I have two PowerShell script. test1.ps1 test2.ps1
step 1) In test1.ps1 I'm setting a output variable using :
$link="google.com"
Write-Host "##vso[task.setvariable variable=packageurl]$link"
step 2) Now I want to use this pacakgeurl variable value in test2.ps1 script.
Ymal code will look like :
- task: AzurePowerShell@3
displayName: 'Query Latest Package'
inputs:
azureSubscription: 'test1'
ScriptType: FilePath
ScriptPath: 'source\test1.ps1'
- task: PowerShell@2
displayName: 'Download package'
inputs:
targetType: filePath
filePath: 'source\test2.ps1'
So basically I have to use the output variable value from 1 task to 2 task via PowerShell script.
I also tried to follow this link : https://developercommunity.visualstudio.com/content/problem/676342/how-to-use-output-variable-from-a-powershell-scrip.html
Can anyone help me on this ..?
Thanks in advance.