简体   繁体   中英

How to configure Azure CI/CD to update latest changes

I am currently developing a chatbot using the azure bot service framework and am having difficulty understanding how to get the latest changes published to the web chat once the pipeline has completed.

I configured the pipeline through azure and pointed it at my repo and master branch, but for some reason when the pipeline has completed the web chat doesn't get updated even though the pipeline includes a publish step.

Is there a setting I am missing in order to get the web chat to update automatically?

Thanks

You can follow the steps below to configure CI/CD.

In Pipeline CI , you could set the master branch as trigger. In this case, when the master branch changes, Build will be triggered.

You could add build step and publish artifacts steps in CI. Then the build will create an artifact which could be used in the CD(Release) step.

For example:

trigger:
- master

pool:
  vmImage: 'windows-latest'

steps:

- task: NuGetCommand@2
  displayName: 'NuGet restore'
  inputs:
    restoreSolution: 'application/*.sln'

- task: VSBuild@1
  displayName: 'Build solution application/*.sln'
  inputs:
    solution: 'application/*.sln'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(Build.ArtifactStagingDirectory)/package/$(Build.BuildId).zip"'

- task: PublishPipelineArtifact@0
  inputs:
    artifactName: 'applicationpackage'
    targetPath: '$(Build.ArtifactStagingDirectory)/package'

In Release CD , you could set the CD trigger for the release and select the Build as the artifacts resource. If you need to use the ARM template, you also could add the resource repo as another artifacts.

在此处输入图像描述

When you set the CD trigger, the release will run after the build pipeline finishes.

You could add the release tasks in the Release Pipeline .(eg Azure resource group deployment , Azure App Service deploy )

Here is a official doc about Azure DevOps CI/CD pipelines for chatbots . You could refer to it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM