首页 > 解决方案 > 使用 Azure DevOps Pipeline 部署 Bot Framework 解决方案

问题描述

我们有一个 Bot Framework 解决方案虚拟助手,我们希望通过连接到 GitHub 的 Azure Pipeline 来部署它。

由于虚拟助手模板,我们需要运行特定的 PowerShell 脚本来实现这一点,但我在 Azure CLI 中遇到了实际的脚本参数。

实现这一目标的最佳方法是什么。没有使用管道部署虚拟助手的文档。

我到目前为止,但我现在收到错误:错误:az bot prepare-deploy:错误:参数--proj-file-path:预期一个参数

我所能看到的是 publish.ps1 脚本应该得到这个参数。

下面是管道:

# Branch trigger needs changing to master/release etc. 
trigger:
- production-cicd

# # Do not trigger build.
# trigger: none

# Disable PR builds
pr: none

pool:
  vmImage: 'ubuntu-latest'

variables:
  buildConfiguration: 'Release'

steps:
- script: dotnet build --configuration $(buildConfiguration)
  displayName: 'dotnet build $(buildConfiguration)'

- task: CopyFiles@2
  displayName: Copy files before publishing script run. 
  inputs:
    SourceFolder: '$(Agent.BuildDirectory)'
    Contents: '**'
    TargetFolder: '$(Build.ArtifactStagingDirectory)'
    CleanTargetFolder: true

- task: AzureCLI@2
  displayName: Deploy Core Bot
  inputs:
    azureSubscription: 'My Bot Subscription Name(xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx)'
    scriptType: 'pscore'
    scriptLocation: 'scriptPath'
    scriptPath: '$(Build.ArtifactStagingDirectory)/s/botname/botname/Deployment/Scripts/publish.ps1'
    arguments: '-resourceGroup "assistantname-rg" -name "assistantname" -projFolder "."'

标签: azurebotframeworkazure-bot-service

解决方案


推荐阅读