Skip to content

AzureDevOps Task to upload the partial or full Web App deployment package to Azure App Services using Kudu Rest API

License

Notifications You must be signed in to change notification settings

emtecinc/AzureDevOps-Partial-AppService-Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Introduction

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.

Micro Frontend deployment

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

  1. Install the task in your AzureDevops account by navigating to the marketplace and click install. Select the AzureDevops account where the task will be deployed to.

  2. Add the task to your Build/Release pipeline by clicking in your Build/Release to add a task. Click the Add button on the task.

Screenshot

  1. Using the task is easy: fill in the following parameters:

Screenshot

Azure subscription - Select the Azure Resource Manager subscription for the deployment. Please see below screenshot for reference.

Screenshot

App Service name - Enter or Select the name of an existing Azure App Service. Please see below screenshot for reference.

Screenshot

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.

Screenshot

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.

Screenshot

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.

Screenshot

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.

Screenshot

  1. When you run the pipeline, the selected application folder will be deployed to Azure. If above values are provided – Utility will perform following steps -
    A. Take the back up of existing wwwroot directory contents into container BackupContainer in coreappstorage RM storage account
    B. Replace the Modules/Module1 and Modules/Module2 folder inside the wwwroot directory with the content present in the a.zip publish artifact file.

Source code

https://github.com/emtecinc/AzureDevOps-Partial-AppService-Deployment

About

AzureDevOps Task to upload the partial or full Web App deployment package to Azure App Services using Kudu Rest API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published