I'm using Azure pipeline to deploy my asp.net web site on an app service. Before deploy, I need to remove some files on the remove app service. The only way is to use kudu api? Or I can use PowerShell script to access and manipulate files directly?
Here is the doc about Azure Web App Service Deploy task. Select the option to delete files on the Azure App Service that have no matching files in the App Service package or folder. You can use Azure PowerShell task to run the Kudo API to delete the files.
In the Azure portal, select Resource groups from the portal menu and select the resource group that contains your app service and app service plan. Select Delete resource group to delete the resource group and all the resources. This command might take several minutes to run.
You can deploy your WAR package to Azure App Service to run your Java web app using the Azure CLI, PowerShell, or the Kudu Publish API. Note: It is not recommended of deploying WAR / JAR / EAR packages using FTP or WebDeploy .
If you are using the 'Deploy Azure App Service' task you are able to explicitly select the way you deploy the application. By setting that to 'WebDeploy' you are able to set the task to remove any files that are on the App Service but are not present in the deployment package.
Configuration would look as follows:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With