update variable value in pipeline definition [Azure DevOps]

Occasional Visitor

I'm having a problem with updating my Azure DevOps pipeline variable values by using powershell script. I'm trying to use syntax I've found in documentation:


Write-Host "##vso[task.setvariable variable=var1;]newValue"

 

The problem is that I don't see any error, and whatever value I use here, it's not updating my variables in pipeline definition.

 

However, new value is available temporary in environment variables inside this particular script, but I was expecting it will store new value in pipeline definition permanently. Is my understanding correct? Or maybe there is some permission issue on our side, that powershell script is not allowed to update pipeline?

1 Reply