Powershell 如何在Azure DevOps中为QnAMaker ChatBot虚拟助手模板创建CI/CD管道
我正在使用Bot Framework Virtual Assistant模板在Azure中创建和配置Bot, 对于这个过程,我有一个ARM模板用于创建资源, 部署PS脚本用于创建knowledgebase和(Deploy.ps1),一旦创建了qnamaker资源 在当前实现中,如果我从本地Powershell工具执行脚本,一切正常:Powershell 如何在Azure DevOps中为QnAMaker ChatBot虚拟助手模板创建CI/CD管道,powershell,azure-devops,botframework,Powershell,Azure Devops,Botframework,我正在使用Bot Framework Virtual Assistant模板在Azure中创建和配置Bot, 对于这个过程,我有一个ARM模板用于创建资源, 部署PS脚本用于创建knowledgebase和(Deploy.ps1),一旦创建了qnamaker资源 在当前实现中,如果我从本地Powershell工具执行脚本,一切正常: 创造资源 创建知识库 知识库配置 我一直在Azure DevOps中配置此设置,如何在CI/CD管道中配置ARM部署和PowerShell脚本执行。 因此,一旦通过
感谢您的帮助首先,您需要将ARM模板放入源存储库(Github或Azure Repos)。见文件 然后创建管道(Yaml或Classic)。参见YAML示例。查看经典UI管道 在部署到Azure订阅之前。您需要创建将Azure订阅连接到Azure devops的。请参阅以获取示例 在管道中,用于部署ARM模板。和用于执行部署PS脚本。参见下面的示例
trigger:
- master
pool:
vmImage: windows-latest
steps:
- task: AzureResourceManagerTemplateDeployment@3
displayName: 'ARM Template deployment: Subscription scope'
inputs:
azureResourceManagerConnection: 'my-azure-sub'
resourceGroupName: 'azrue resource group'
location: 'West Europe'
csmFile: **/template.json
csmParametersFile: **/parameter.json
deploymentMode: Incremental
- task: AzurePowerShell@5
displayName: 'Azure PowerShell script: FilePath'
inputs:
azureSubscription: 'my-azure-sub'
ScriptPath: **/Deploy.ps1
azurePowerShellVersion: LatestVersion
有关更多信息,请参阅。Hello@Levi Lu MSFT,我面临的挑战是获取deploy.ps1的输出并将其用于更新认知模型,脚本deploy.ps1生成某些密钥(kbid auth key等),这些密钥需要由发布管道使用,我们必须更新认知模型,我甚至提到了这个文档,但并没有明确提到如何在发布管道中使用build管道的输出变量来更新认知模型,希望你们理解我的担忧