powershell - 如何在构建工件中引用文件
问题描述
我有一个从构建管道创建的发布管道。创建的工件具有 PowerShell 函数 - 该函数基于 template.json 文件在 Azure 中部署一组资源组。所以我需要执行 New-AzDeployment 并从构建工件中传入 template.json。
我试过使用 $(Build.SourcesDirectory) 和其他变量,但是 powershell 错误,因为它不知道那是什么
New-AzDeployment -Name "resourceGroupDeployment" `
-TemplateParameterFile "$(Build.SourcesDirectory)/resourceGroup.Parameters.json" `
-TemplateFile "$(Build.SourcesDirectory)/resourceGroup.Template.json" `
解决方案
推荐阅读
- java - 尝试使用 maven 安装 arcgis-java 依赖项时出现 403 Forbidden
- html - 移动上的滑块剪切图像 WordPress
- python-3.x - PyTest:如何使用特定标记运行特定脚本
- sql - 当列默认逻辑时,表如何包含大小写?
- apache-kafka - kafka connect可以使用主题作为源然后将其下沉到另一个主题吗?
- java - 通过反射调用嵌套的 deepobject 方法
- python - 无法导入手电筒
- eclipse - 当退格所有字母时,不要在 Eclipse 中显示自动完成
- apache - 错误 404 重定向不适用于我的 .htaccess
- mysql - 尽管语法应该是正确的,但为什么这些触发器没有检测到错误的数据?