Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS : Can I access the Build variables from Release definition?

In VSTS CI/CD , I am setting some variable's value in a Powershell task in CI. During CD I want to access that variable's value to do something , lets say echo.

Is this possible? If so, how?

like image 914
Aakash Uniyal Avatar asked Dec 23 '22 06:12

Aakash Uniyal


1 Answers

You could write it out to a json/xml file and include that file in your published artifacts of your build defintion. Then read in that file via PowerShell in your release definition.

ConvertTo-Json | Out-File "file.json"
Get-Content "file.json" | ConvertFrom-Json
like image 135
Calidus Avatar answered May 21 '23 02:05

Calidus