Table of contents

Official Content

This article shows you the steps to deploy Angular applications to Azure Blob Storage, using 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 HowTo: Deploy Frontend applications to a 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  HowTo: Deploy Frontend applications to a 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:

Sample

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

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant