Function App Build & Deploy Pipeline
Purpose
- Builds and deploys the
Publix.S0PMOBAI.FunctionAppservice via a reusable standard deployment template. - Promotes a single .NET Function App artifact through Dev → Test → Stage → Prod while supporting multi-region rollout.
Resources
- Imports
templates/function-apps/standard-deployment.ymlfrom the sharedS0AIDXXX-AI Delivery/s0aidxxx-templatesrepository (tagv1.1.1).
Triggers
- Branches:
main, anyreleases/*branch. - Paths:
src/services/*(excluding the WebAPI subtree). - Lower environments are conditionally skipped for release branches inside each
stage using
not(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/')).
Agent Pool
- Executes on
ubuntu-latest-publix.
Stage Overview
- Single stage driven by the shared template with key parameters:
buildPath:**/Publix.S0PMOBAI.FunctionApp.csproj(glob resolved by template).buildConfiguration:Release.artifactName:Publix.S0PMOBAI.FunctionApp.appShortName:pmobchat.publishWebProjects:falseto ensure Function App-specific packaging.
- Template handles restore/build, artifact publish, and deployment across multiple environments and regions.
Environment Matrix
- Each entry supplies the Azure connection, DevOps environment, deployment regions, and release gating behavior.
| Env | Service Connection | ADO Environment | Condition | Regions | Notes |
|---|---|---|---|---|---|
| Dev | s0pmobai-01-dev | DEV_S0PMOBAI | Skipped on release branches | ut, uc | Standard rollout |
| Tst | s0pmobai-01-tst | DEV_S0PMOBAI | Skipped on release branches | ut, uc | Mirrors Dev path |
| Stg | s0pmobai-01-stg | DEV_S0PMOBAI | Skipped on release branches | ut, uc | Pre-prod validation |
| Prd | s0pmobai-01-prd | PRD_S0PMOBAI | Always active | ut, uc | Production multi-region |
Both ut and uc regions are deployed; template supports multiple regions per
environment.
Release Branch Behavior
- Dev/Test/Stage stages are wrapped with
not(startsWith(..., 'refs/heads/releases/')), preventing release branches from redeploying lower environments. - Production stage lacks the guard so release branches can deploy directly to prod after validation.
Maintenance Notes
- Update template tags deliberately; new versions may change required parameters or behavior.
- Keep region lists in sync with available Function App deployments (
utanducexpected). - For additional configuration (e.g., custom app settings, connection strings),
extend
environmentObjectsin the YAML or adjust the shared template as needed. - Secrets and connection strings should be managed via Azure DevOps variable groups or Key Vault references consumed by the template.
- Ensure
publishWebProjects: falseremains set to prevent inadvertent web project packaging instead of Function App output.