Skip to main content

UI Build & Canary Pipeline

Build Status

View pipeline in Azure DevOps

Purpose

  • Builds and deploys the s0pmobai-admin-site UI using a reusable multi-stage template.
  • Promotes a single artifact through Dev → Test → Stage → Prod with canary health checks at each step.

Resources

  • References the S0AIDXXX-AI Delivery/s0aidxxx-templates repo (tag v1.0.0) to import templates/appservices/canary-deployment-multi-stage-build.yml.

Triggers

  • Branches: main, any releases/* branch.
  • Paths: limited to src/ui/s0pmobai-admin-site/** changes.
  • Release branch guard inside the template prevents lower environments from running when source branch starts with refs/heads/releases/.

Agent Pool

  • Runs on ubuntu-latest-publix.

Stage Overview

  • Single stage driven by the shared template with parameters:
    • buildType: node project.
    • buildPath: src/ui/s0pmobai-admin-site.
    • artifactName: Publix.S0PMOBAI.AdminUI.
    • appShortName: pmobchat.
    • appType: wbap (web app).
    • optionalNpmInstallArgs: --force to tolerate peer dependency conflicts.
  • The imported template handles build, artifact publish, canary deployment, health validation, and slot promotion.

Environment Matrix

  • Each environment entry defines its service connection, Azure DevOps environment, deployment regions, and runtime configuration.
EnvService ConnectionADO EnvironmentConditionRegionsKey Variables
Devs0pmobai-01-devDEV_S0PMOBAISkipped on release branchesuc, utVITE_API_BASE_URL, VITE_AZURE_CLIENT_ID, VITE_API_SCOPE, VITE_AZURE_AUTHORITY, VITE_ENVIRONMENT=DEV
Tsts0pmobai-01-tstDEV_S0PMOBAISkipped on release branchesuc, utSame keys populated with TST values
Stgs0pmobai-01-stgDEV_S0PMOBAISkipped on release branchesuc, utSame keys populated with STG values
Prds0pmobai-01-prdPRD_S0PMOBAIAlways activeuc, utProd values for the same keys

Environment Variables

  • Passed via optionalEnvironmentVariables to align frontend runtime config per stage:
    • VITE_API_BASE_URL
    • VITE_AZURE_CLIENT_ID
    • VITE_API_SCOPE
    • VITE_AZURE_AUTHORITY
    • VITE_ENVIRONMENT

Canary Deployment Flow

  1. Build and package UI artifact.
  2. Deploy to the specified canary slot/cluster in each region (uc, ut).
  3. Validate health (handled by template logic).
  4. Promote to production slot for that environment when healthy.
  5. Continue to the next environment; failures halt the pipeline.

Release Branch Behavior

  • Dev, Tst, and Stg stages include the guard not(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/')) to skip lower environments for release hardening.
  • Prd always executes so release branches can deploy straight to production after validation.

Maintenance Notes

  • Update the template tag when new pipeline features or fixes are needed.
  • Rotate secrets and endpoints at the variable group level; the pipeline automatically consumes updated values.
  • Extend regions by editing the regions arrays; additional entries beyond uc and ut are supported.
  • Additional npm flags or environment variables can be supplied via the existing template parameters.