gpt4 book ai didi

azure - 如何小写 Azure DevOps 管道变量名称

转载 作者:行者123 更新时间:2023-12-04 00:02:28 25 4
gpt4 key购买 nike

请您建议如何在 Azure DevOps 管道中小写环境名称。

enter image description here

当环境名称为“Test”时,我希望帐户名称为 myprefixtest

最佳答案

我认为当您使用该任务时(例如在 Azure CLI 任务中),没有可以降低的选项,但您可以添加一个小型 PowerShell 脚本,在 Azure CLI 任务之前执行此操作:

$envName = "$(Release.EnvironmentName)"
$lower = $envName.ToLower()
Write-Host "##vso[task.setvariable variable=Release.EnvironmentName;]$lower"

enter image description here

关于azure - 如何小写 Azure DevOps 管道变量名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58268287/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com