2
votes

I'm trying to create Azure deployment of three applications (App Service with Virtual Applications). The structure should be as follows:

/app-1
/app-2
/

Where the 3-rd application is contained in the root, containing some static files (index.html, Web.config).

For the goal I've created 2 release pipelines:

  1. Deploying app-1 and static files to root
  2. Deploying app-2

When I run the app-2 pipeline and then the app-1 & tatic files pipeline, everything works as expected. However, when the app-2 pipeline is ran last, the root (3-rd application) is purged, even that it's configured to deploy only to the corresponding virtual application.

Any ideas?

EDIT: Found a workaround. All of the Deploy Azure App Service tasks were added Additional Deployment Options - Web Deploy, Preserve files.

The same command was executed as before, however it seems to have effect.

1
By default, your deployment happens to the root application in the Azure Web App. If you want to deploy to a specific virtual application, enter its name in the Virtual Application property of the Azure App Service Deploy task. Note that each app has the default root path (/) mapped to D:\home\site\wwwroot, where your code is deployed by default. If your app root is in a different folder, or if your repository has more than one application, you can edit or add virtual applications and directories.AjayKumar-MSFT
Yes, I'm using virtual applications, as stated above. And the release pipelines have virtual application configuration.Liliyan Krumov

1 Answers

1
votes

Workaround

Change task version to 3. (There is 1 important change between 3<->4 - packageForLinux for version 3 is not alias for Package as it is in v4)

input json (it is not clear from readme what are inputs names): https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/AzureRmWebAppDeploymentV3/task.json

readme: https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/AzureRmWebAppDeploymentV3/README.md

More info in this github issue: https://github.com/microsoft/azure-pipelines-tasks/issues/13946


I also had the same issue during last days and I finally found workaround. Not desired one but it works at least.


For me workaround with web deploy was not working properly as my app was rewriting root with app files from old deploy. (O_o)

This issue is very similar to my issue so that's why I left here another workaround.