Deploy Front-end applications to Azure Blob Storage

Official Content
This documentation is valid for:

In order to deploy Angular applications to Azure Blob Storage, you can use the Application Deployment tool from inside the GeneXus IDE, or MSBuild commands.

The solution is based on MSBuild tasks, which allow you to easily extend, customize, and automate your deployments in a CI/CD pipeline.

In this document, you'll see how to deploy an Angular application to Azure Blob Storage using MSBuild tasks.

First, execute the deploy.msbuild script to create the .gxdproj file, and run the script to build the project, as explained in the steps 1 and 2 of Deploy Front-end applications to Cloud Provider Object Storage.

The third step is to upload the package.

You have to execute the deploy.msbuild script which is available under the DeploymentTargets folder in the GeneXus installation (as explained in  Deploy Front-end applications to Cloud Provider Object Storage).

In the case of Azure, the properties to add are as follows:

  • STATICFRONTEND_AZURE_STORAGE_ACCOUNT: Storage account name
  • STATICFRONTEND_AZURE_STORAGE_ACCOUNT_KEY: Storage account key
  • STATICFRONTEND_AZURE_SP_APP_ID: Service principal Application ID
  • STATICFRONTEND_AZURE_SP_TENANT_ID: Service principal Tenant ID
  • STATICFRONTEND_AZURE_SP_CREDENTIALS: Service principal credentials

Other properties should be passed as well:

Example

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /nologo /verbosity:minimal /ToolsVersion:4.0 "C:\Development\Trunk\Genexus\DeploymentTargets\StaticFrontEnd\deploy.msbuild" /p:STATICFRONTEND_PROVIDER="azureblobstorage"
/p:STATICFRONTEND_AZURE_STORAGE_ACCOUNT="storagetest"
/p:STATICFRONTEND_AZURE_STORAGE_ACCOUNT_KEY="********"
/p:STATICFRONTEND_AZURE_SP_APP_ID="**********"
/p:STATICFRONTEND_AZURE_SP_TENANT_ID="***********"
/p:STATICFRONTEND_AZURE_SP_CREDENTIALS="*******"
/p:DeployFullPath="C:\models\TestAngular\TestAngular\NetCoreSQLServer1004\Deploy\STATICFRONTEND\DeploymentUnit2\20220107171829"
/p:GX_PROGRAM_DIR="C:\Development\Trunk\GeneXus"
/p:ProjectName="myproject" 
/t:Deploy

See also

Build and deploy a static website to Azure Storage Static Websites: setting up the cloud