0

I'm deploying a WebJob using a release pipeline. The pipeline task is being called as follows:

- az webapp deployment source config-zip -g <my-resource-group> -n <my-app-service> --src $zipFilePathLocation

It happens that when deploying, the other WebJobs that were running on the same resource were Deleted.

Deploying directly through Visual Studio, WebJob rises correctly without deleting the other Jobs.

However, I need to deploy via Azure CLI.

Does anyone have any idea what might be going on?

AjayKumar
  • 2,812
  • 1
  • 9
  • 28
r31sr4r
  • 306
  • 1
  • 2
  • 12

2 Answers2

1

-By default, Kudu executes the build steps for your Node/.NET application (npm install/donet build). For deployment via Azure DevOps, then the Kudu build is unnecessary. You may disable the Kudu build, create an app setting, SCM_DO_BUILD_DURING_DEPLOYMENT, with a value of false- and see if it helps.

-Clear RemoveAdditionalFilesFlag (Remove additional files at destination) With this enabled - it will also remove all files related to any extensions installed on this Azure App Service. To prevent this, set the Exclude files from App_Data folder checkbox.

So, essential site **\wwwroot\App_Data\jobs**continuous\testwebjob -ensure that your deployment is not replacing this.

Furthermore, publishing the Web App automatically publishes the WebJob where it belongs. It all happens in a single zip file. Do not try to publish the WebJob project individually once you do that. See this similar discussion thread.

AjayKumar
  • 2,812
  • 1
  • 9
  • 28
0

I don't know if it's the best solution, but I was able to solve my problem by creating App Service Slots and deploying each WebJob in a separate Slot.

r31sr4r
  • 306
  • 1
  • 2
  • 12