Skip to main content

Function App Build & Deploy Pipeline

Build Status

View pipeline in Azure DevOps

Purpose

  • Builds and deploys the Publix.S0PMOBAI.FunctionApp service 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.yml from the shared S0AIDXXX-AI Delivery/s0aidxxx-templates repository (tag v1.1.1).

Triggers

  • Branches: main, any releases/* 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: false to 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.
EnvService ConnectionADO EnvironmentConditionRegionsNotes
Devs0pmobai-01-devDEV_S0PMOBAISkipped on release branchesut, ucStandard rollout
Tsts0pmobai-01-tstDEV_S0PMOBAISkipped on release branchesut, ucMirrors Dev path
Stgs0pmobai-01-stgDEV_S0PMOBAISkipped on release branchesut, ucPre-prod validation
Prds0pmobai-01-prdPRD_S0PMOBAIAlways activeut, ucProduction 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 (ut and uc expected).
  • For additional configuration (e.g., custom app settings, connection strings), extend environmentObjects in 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: false remains set to prevent inadvertent web project packaging instead of Function App output.