UI Build & Canary Pipeline
Purpose
- Builds and deploys the
s0pmobai-admin-siteUI 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-templatesrepo (tagv1.0.0) to importtemplates/appservices/canary-deployment-multi-stage-build.yml.
Triggers
- Branches:
main, anyreleases/*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:nodeproject.buildPath:src/ui/s0pmobai-admin-site.artifactName:Publix.S0PMOBAI.AdminUI.appShortName:pmobchat.appType:wbap(web app).optionalNpmInstallArgs:--forceto 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.
| Env | Service Connection | ADO Environment | Condition | Regions | Key Variables |
|---|---|---|---|---|---|
| Dev | s0pmobai-01-dev | DEV_S0PMOBAI | Skipped on release branches | uc, ut | VITE_API_BASE_URL, VITE_AZURE_CLIENT_ID, VITE_API_SCOPE, VITE_AZURE_AUTHORITY, VITE_ENVIRONMENT=DEV |
| Tst | s0pmobai-01-tst | DEV_S0PMOBAI | Skipped on release branches | uc, ut | Same keys populated with TST values |
| Stg | s0pmobai-01-stg | DEV_S0PMOBAI | Skipped on release branches | uc, ut | Same keys populated with STG values |
| Prd | s0pmobai-01-prd | PRD_S0PMOBAI | Always active | uc, ut | Prod values for the same keys |
Environment Variables
- Passed via
optionalEnvironmentVariablesto align frontend runtime config per stage:VITE_API_BASE_URLVITE_AZURE_CLIENT_IDVITE_API_SCOPEVITE_AZURE_AUTHORITYVITE_ENVIRONMENT
Canary Deployment Flow
- Build and package UI artifact.
- Deploy to the specified canary slot/cluster in each region (
uc,ut). - Validate health (handled by template logic).
- Promote to production slot for that environment when healthy.
- Continue to the next environment; failures halt the pipeline.
Release Branch Behavior
Dev,Tst, andStgstages include the guardnot(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/'))to skip lower environments for release hardening.Prdalways 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
regionsarrays; additional entries beyonducandutare supported. - Additional npm flags or environment variables can be supplied via the existing template parameters.