Youssef CH
Youssef CH

Reputation: 741

exclude folder from delete in Azure Web APP deploy task

i've two applications (frontend and backend) in same Azure Web APP (Windows Plan).

The backend application is under wwwroot\back folder

The frontend application is under wwwroot folder

When i deploy the frontend using azure web app deploy task under Azure DevOps, the backend folder will be overwritting. Also , the same thing when deploy backend

Any idea , to do a exclude of same folder before deploy the front ?

Upvotes: 3

Views: 2279

Answers (1)

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35109

Any idea , to do a exclude of same folder before deploy the front ?

In Azure Web APP deploy task, there is no such option could meet your requirements.

You could try to use Azure App Service deploy task.

In Azure App Service deploy task, you could enable the Select deployment method option and input the -skip argument

enter image description here

For example:

-skip:Directory=\\back 

OR

-skip:skipAction=Delete,objectName=dirPath,absolutePath=wwwroot\\back

-skip:skipAction=Update,objectName=dirPath,absolutePath=wwwroot\\back 

Then the target folder will skip the option to modify the content.

For more detailed information, you could refer to this ticket:Azure Pipelines: Exclude folders using Azure App Service Deploy and this blog: Demystifying MSDeploy skip rules.

Upvotes: 3

Related Questions