How to deploy azure webjob automatically via VS Team Services - release

江枫思渺然 提交于 2019-12-04 12:34:40
starian chen-MSFT

Refer to these steps to publish/deploy web job:

  1. Open VS 2015 and create a Web Job project (e.g. WebJob1)
  2. Right click the project > Publish As Azure WebJob, then it will create webjob-publish-settings.json file (This is required)
  3. Create a build definition, steps:
    • NuGet Installer (Path to solution or packages.config: **\*.sln; Installation type: Restore)
    • Visual Studio Build (Solution: **\*.sln, MSBuild Arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\")
    • Publish Build Artifacts (Path to Publish: $(build.artifactstagingdirectory); Artifact Name: drop; Artifact Type: Server)
  4. Queue build
  5. Create a release definition and link to that build definition(Artifacts tab), tasks:
  6. Azure App Service Deploy (Specify Azure Subscription and App Service name; Package or Folder: $(System.DefaultWorkingDirectory)\**\WebJob1.zip
  7. Create a new release

On the other hand, to configure the Azure service endpoint, you can refer to this blog: Automating Azure Resource Group deployment using a Service Principal in Visual Studio Online: Build/Release Management.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!