Azure powershell在内联脚本中提及文件路径

Azure powershell在内联脚本中提及文件路径,azure,azure-devops,Azure,Azure Devops,我想使用Azure PowerShell内联脚本将文件上载到API管理。我无法找到在PowerShell脚本中如何提及工件的文件路径的方法 希望使用Azure PowerShell,它使用AzureRM服务连接来访问API管理服务并上传如下所示的swagger文件 Import-AzureRmApiManagementApi-Context$ApiMgmtContext-SpecificationFormat“Swagger”-SpecificationPath“My_-Azuredevops_

我想使用Azure PowerShell内联脚本将文件上载到API管理。我无法找到在PowerShell脚本中如何提及工件的文件路径的方法

希望使用Azure PowerShell,它使用AzureRM服务连接来访问API管理服务并上传如下所示的swagger文件

Import-AzureRmApiManagementApi-Context$ApiMgmtContext-SpecificationFormat“Swagger”-SpecificationPath“My_-Azuredevops_repo_path_to_file”-path“API


这里的路径似乎可以通过利用其中一个变量来提及。请检查链接并提及适当的变量

如果它是下载源代码文件的代理上的本地路径,则可能需要变量$(Build.SourcesDirectory)/$(Build.Repository.LocalPath)/$(System.DefaultWorkingDirectory)


希望这有帮助!

你的问题进展如何?奎师那的回答有用吗?