Azure App Service- Partial package deployment to support Micro Frontend architecture
This task is used to upload the partial or full Web App deployment package on Azure Web App through Kudu Rest API.
The default Azure Web App Deploy task provides the ability to deploy and replace the entire package from the application's directory on the Azure Web App. But in the Micro Frontend architecture applications, different teams/developers might be working on different independent Micro Frontend apps and deploying the entire application requires a complete regression testing cycle.
To avoid this, we need a way to deploy individual applications to App Service so that there is no impact on other applications.
This task allows users to specify one more apps that need to be deployed to the App Services.
This extension also provides the functionality to the backup of the existing wwwroot directory if Azure storage settings are configured.
Note: This extension with set the website application setting variable WEBSITE_RUN_FROM_PACKAGE to 0, so that KUDU can replace the files/folders.
Steps to use and configure the task
Azure subscription - Select the Azure Resource Manager subscription for the deployment. Please see below screenshot for reference.
App Service name - Enter or Select the name of an existing Azure App Service. Please see below screenshot for reference.
Package or Folder - File path to the package or a folder containing app service contents generated by MSBuild or a compressed zip. Please see below screenshot for reference.
Folders to Publish - For partial package deployment, enter the comma-separated list of directories path relative to wwwroot folder of your deployment package. You can also provide the path as '/' if you want to upload and replace the full package. In following example – Two module folders namely Module1 and Module2 inside Modules folder will be replaced in the wwwroot directory folder.
Optionally add the following parameters -
Alternative Kudu URL - value of SCM endpoint if it is not website.scm.azurewebsites.net. (fill in only last part starting with scm)
Slot - value of slot name if deploying an app to a slot.(provide value only if deploying the application to a slot)
RM Storage Account - Specify a pre-existing ARM storage account for uploading the backup of the current wwwroot folder. Note: The selected azure resource manager should have access to this storage resource. Please see below screenshot for reference.
Container Name - Name of the Container for uploading the backup files. Container with the given name must exist in the specified storage account. Note: The selected azure resource manager should have access to this storage resource. Please see below screenshot for reference.