[英]Azure devops variable groups in powershell
I have a variable defined in Azure devops variable group like below:我在 Azure devops 变量组中定义了一个变量,如下所示:
apple-prod-branch refs/heads/release-823T0709
The above variable works when called in azure pipeline powershell command when called like:上述变量在 azure 管道 powershell 命令中调用时起作用,如下所示:
"Write-Host $(apple-prod-branch)"
Output is:
refs/heads/release-823T0709
In the above variable name apple-prod-branch, apple is the repo name.在上面的变量名 apple-prod-branch 中,apple 是 repo 名称。 How can I use the repo name and use a variable like this?如何使用 repo 名称并使用这样的变量?
$repo_name = "apple"
"Write-Host $($(repo-name)-prod-branch)"
End result needs to be最终结果必须是
refs/heads/release-823T0709
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.