When trying to read Secret variables that is setup in azure release pipeline, I got the following error.
The term 'SecretVariableName' is not recognized as the name of a cmdlet, function, script file or operable program. ....
I know the variable is 100% correct but none of the following ways help to read it. Other non-secret varaibles works just fine.
$myvar1 = $(SecretVariableName)
$myvar2 = "$(SecretVariableName)"
$myvar3 = $Env:SecretVariableName
All these DIDN'T work. Where SecretVariableName is a secret variable inside Release Pipeline.
As side note:
- For non-secret variables, it works just fine.
- Running as an inline script in the pipeline works as well.
The problem is when attempting to read the secret variable inside marketplace task that is used to create a vsix file and uploaded in visualstudio marketplace
How can I successfully access it?
Thanks,