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

喜你入骨 提交于 2019-12-06 06:42:15

问题


I want to deploy azure webjob using build and release management of visual studio team services. I have created a webjob project and I already deployed from visual studio and I am looking to make the deployment automatic.

Thank you!


回答1:


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.



来源:https://stackoverflow.com/questions/43112086/how-to-deploy-azure-webjob-automatically-via-vs-team-services-release

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