我试图将一个变量值从Python脚本传递到一个YAML文件中,以便在Azure开发人员Ops管道上运行。我在YAML文件中使用以下代码:
- bash: |
studentName=$(sed -i {/$deploymentResult.properties.outputs.studentName.Value/'a\}' "/CreateEnvironment.ps1")
echo "##vso[task.setvariable variable=studentName]studentName"
echo "##vso[task.setvariable variable=outputstudentName;isoutput=true]studentName"
但是当在应用程序服务名称中使用变量studentName时,我从pipepline中得到一个错误:error:无法获取应用程序服务“studentName”详细信息
有人知道关于AzureDevOps管道以及如何做到这一点吗
请不要只是发布Microsoft到Azure DevOps材料的链接,我已经仔细看过了
此问题的原因是设置值时缺少
$
。正确的脚本是:相关问题 更多 >
编程相关推荐