Multiple Jobs Deployment in Visual Studio Team Services

后端 未结 2 1099
予麋鹿
予麋鹿 2020-12-22 04:08

I have a VS solution with multiple projects, each project is an independent WebJob which I am hosting in a Single AppServices. I am trying to automate this to Continuous dep

2条回答
  •  既然无缘
    2020-12-22 04:34

    You can have different WebJobs project(WebJob1.csproj, WebJob2.csproj) in a single solution and you can deploy using single build and release pipeline. All you need to do is :-

    In your build solution step define:-

    1. Visual Studio Build (Solution: ***.sln, MSBuild Arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\")

    2. Publish Build Artifacts (Path to Publish: $(build.artifactstagingdirectory); Artifact Name: drop; Artifact Type: Server)

    Create a release definition for this build definition and add a task

    1. Azure App Service Deploy
    2. Select your Azure Subscription and App Service name;
    3. Select your Package or Folder: $(System.DefaultWorkingDirectory)**\WebJob1.zip

    You can similary create another Azure App Service Deploy task for WebJob2.zip and deploy as many webjobs you want through a single build and release pipeline.

提交回复
热议问题