【发布时间】:2021-12-04 06:18:44
【问题描述】:
我有一个返回字符串值的 Powershell 脚本。我正在使用 AzurePowerShell 任务调用此脚本,并且我想保留返回的值以在同一管道中的后续任务中使用它。我怎样才能做到这一点?请问有什么想法吗?
function a {
<<processing steps>>
return $(testString)
}
- task: AzurePowerShell@
ScriptPath: Powershelltest.ps1 (calls the above powershell script)
- task: AzureCLI@
inlineScript: |
use the value from $testString(??)
How can I catch the return value from Powershell in the first task (AzurePowerShell) and use it in AzureCLI task?
Thanks
[1]: https://i.stack.imgur.com/Ktlaf.png
【问题讨论】:
-
请以纯文本格式发布代码,格式正确。
标签: azure powershell azure-devops