I'm developper of a private custom extension usable in Azure Devops.
I have a problematic around the output of task.json in our extension and wonder if you can help to clarify / resolve the problematic.
1-What works.
I have created a release with 2 step :
First step, execute my extension
Second Step, retrieve output variable (sorry for the naming of the task, I'm in testing mode)
Our task.json execute a script named vm.ps1
In this vm.ps1 script, I have a piece of code to set the value of the variable $VirtualMachineId:
This value is then retrieve with the second step of the release, azure powershell inline script :
The result is diplayed in the log :
My value is retrieved, the goal is accomplish.
2-What doesn’t work : Implement in the task.json
Now, if I want to fully implement this variable in the product, I need to add this one in the output section of our task.json :
So, the UI of our interface will be display in the output section like the example below ( do not be disturb to not see VirtualMachineId in the below image, it is an illustration image):
I run another time my release, as I can see in the log of the extension execution, the variable is set with appropriate value.
Then the Azure inline script execute and the value is empty :
To resume: If I declare the variable in the output section of the task json, I can't retrieve the value or the value is empty. Does anybody here have an idea of what I do wrong ?
Thanks to have take time to read me.