我想使用json文件存储powershell脚本使用的变量。在Azure DevOps中,我已经配置了流水线,其中包含一个带有变量列表的powershell脚本。我想使用json文件并将所有变量存储在该文件中。我想将json文件存储在Azure仓库中,并在启动流水线时使用它。我不想使用变量组。我找到了这个解决方案[Json to Variable]https://marketplace.visualstudio.com/items?itemName=OneLuckiDev.json2variable&targetId=02fbae5c-cc01-4c8b-a90f-7393a3156347 ,但我读到了一些关于此任务的不好的意见。是否有任何方法可以使用json文件作为存储变量的位置,或者我可以使用不同的文件格式?
更新:
![enter image description here](https://istack.dev59.com/cCQ4T.webp)
echo
命令设置变量:echo "##vso[task.setvariable variable=a]20"
: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-in-script - Pero P.