Skip to main content
Cloud DevOps Solutions
Get a quote Talk to an engineer

CI/CD and GitOps

Azure Pipelines Consulting for Governed, Repeatable Delivery

Azure Pipelines is the CI/CD service in Azure DevOps, defined in YAML and run on Microsoft-hosted or self-hosted agents. We design its template structure, environments and approvals, service connections, agent pools and deployment strategies so releases to Azure, AKS and other targets are controlled, auditable and fast.

Key takeaways

  • Azure Pipelines is a strong fit when boards, repositories, artefacts and release governance already live in Azure DevOps, and for deployments to Azure.
  • YAML templates with extends enforce a company standard that individual pipelines cannot quietly bypass.
  • Service connections should use workload identity federation rather than client secrets that expire and leak.
  • Environments carry approvals, checks and deployment history, which is where release governance belongs.
  • Agent pool choice, hosted or self-hosted, is a cost, speed and network access decision that deserves measurement.

What teams use Azure Pipelines for

Multi-stage YAML pipelines

Build, test, scan and deploy are expressed in one versioned pipeline with stages that map to environments.

Deployments to AKS and Azure services

Container images and Helm charts are promoted through environments with approvals and automated verification.

Governed releases with approvals and checks

Production deployments require named approvers, business hours rules or automated gates before proceeding.

Self-hosted agents inside private networks

Agents run in a virtual network to reach private databases, clusters and registries that hosted agents cannot.

Classic release to YAML modernisation

Click-configured classic pipelines are converted into reviewed, versioned YAML with shared templates.

What Azure Pipelines is and who it suits

Azure Pipelines is the CI/CD component of Azure DevOps, sitting beside Boards, Repos, Test Plans and Artifacts. A pipeline is defined in a YAML file, triggered by commits or schedules, and executed by agents. It builds almost any language, can target any cloud or on-premises system, and has particularly smooth integration with Azure resources.

It fits best when your organisation already plans work in Azure DevOps, wants approvals and audit trails that governance teams recognise, or deploys mostly to Azure. Our Azure Pipelines consulting work usually involves cleaning up a mix of classic release pipelines, copy-pasted YAML and a handful of service connections with far too much access.

How we structure pipelines in production

Templates and the extends model

The single most useful design decision is a central template repository. Application pipelines do not define steps from scratch; they extend a template that enforces build, scan and publish, and accept parameters for what varies.

# azure-pipelines.yml in an application repository
trigger:
  branches:
    include: [main]

resources:
  repositories:
    - repository: templates
      type: git
      name: Platform/pipeline-templates
      ref: refs/tags/v4

extends:
  template: standard-service.yml@templates
  parameters:
    serviceName: orders-api
    deployEnvironments:
      - name: staging
      - name: production

Because the pipeline extends the template, required steps such as image scanning cannot be quietly removed by an application team. Tagging the template repository lets the platform team roll out changes deliberately. This mirrors the approach in our reusable workflows and pipeline as code work.

Environments, approvals and checks

Deployment jobs target environments. An environment can require approvals, restrict branches, apply business hours checks, and hold exclusive locks so two deployments do not collide. It also records what was deployed and when. We map environments to your actual release process and keep production approvers as a named group, not individuals. See environment promotion gates and approvals.

Build once, promote the artefact

The pipeline builds an image or package once, then promotes the same artefact through environments. Rebuilding for each stage is a common source of “it worked in staging” surprises. We tag images from the commit and deploy by digest.

Deployment strategies and verification

Deployment jobs support run-once, rolling and canary strategies, with lifecycle hooks for pre-deploy, routing and post-deploy steps. We pair them with smoke tests that run immediately after release and with automated rollback to the previous artefact when checks fail. For regulated teams, the same environment history gives an audit trail of what was deployed, by which pipeline run, approved by whom. Keeping verification inside the pipeline means a bad release is caught in minutes, not by the first customer to notice.

Security and access

  • Workload identity federation. Service connections to Azure use federated credentials, so no client secret is stored or rotated. Scope each connection narrowly.
  • Key Vault for secrets. Pipelines read secrets at run time from Azure Key Vault instead of long-lived variable group values.
  • Pipeline permissions. Restrict which pipelines may use each service connection, agent pool and variable group, and avoid “grant access to all pipelines”.
  • Protected branches and build validation. Pull request policies require a successful build and review before merging.
  • Fork and external contribution settings. Control whether secrets are exposed to builds from forks.
  • Least-privilege identities. Project build service accounts get only the repository and artefact access they need.

Teams deploying to clusters should also read our guidance on Azure DevOps consulting for the wider organisation-level setup.

Cost and capacity

Cost control starts with knowing which pipelines consume the most minutes.

Parallel jobs are the capacity you pay for with Microsoft-hosted agents, and extra parallelism is a licensing decision. Before buying more, reduce waste: skip jobs for unchanged paths, cache package restores, cancel superseded runs, and split long suites sensibly. Self-hosted agents add infrastructure cost but may reduce per-minute spend and allow private access. Use scale-set agents so capacity expands under load and returns to zero after, and keep them ephemeral so one job cannot influence the next.

Day-2 operations

  • Template versioning: treat the template repository as a product, with changelogs and a deprecation policy.
  • Agent upkeep: update agent software and images regularly, and monitor queue time per pool.
  • Housekeeping: set retention policies on runs and artefacts, review stale pipelines and prune unused service connections.
  • Auditing: use audit logs to see who changed permissions or approvals.

Failure modes we design around

  • Over-privileged service connections that can touch every subscription. We scope to a resource group and use federation.
  • Classic release pipelines nobody dares edit. We convert them to YAML in stages.
  • Approvals tied to one person who goes on leave. We use groups with a backup.
  • Shared self-hosted agents with leftover state. We move to ephemeral scale-set agents.
  • Variable group sprawl with duplicated secrets. We centralise in Key Vault.

When to choose something else

If your code lives in GitHub, GitHub Actions is often the simpler route, and Azure Pipelines can still be used with GitHub repositories if you value its governance features. If you run GitLab, use its native CI. For complex estates still on Jenkins, plan a gradual move. For Azure AKS delivery, we often keep Azure Pipelines for build and test and let ArgoCD or Flux apply changes, which keeps cluster credentials out of the pipeline.

For a full walkthrough, read our Azure DevOps pipelines guide, see our CI/CD pipeline service, or book a consultation.

Official documentation: learn.microsoft.com/en-us/azure/devops/pipelines

How we work with Azure Pipelines

  1. 01

    Assess pipelines and permissions

    We review classic and YAML pipelines, service connections, variable groups, agent pools and who can edit or approve what.

  2. 02

    Design templates and stages

    We build a template repository for build, scan and deploy, and decide how pipelines extend it so required steps cannot be removed.

  3. 03

    Secure connections and secrets

    Service connections move to workload identity federation, secrets move to Azure Key Vault, and scopes are narrowed to the resources needed.

  4. 04

    Model environments and gates

    Environments get approvals, branch controls, checks and exclusive locks, matching how your organisation wants to release.

  5. 05

    Tune agents and speed

    We apply caching, parallel jobs and right-sized pools, and decide where self-hosted agents are justified.

  6. 06

    Document and hand over

    Template versioning, onboarding for new teams and incident procedures are written and rehearsed with your engineers.

Azure Pipelines compared with the alternatives

We recommend the tool that fits your team, not the one we know best. Here is when each option makes sense.

OptionChoose it when
Azure PipelinesAzure Pipelines is the CI/CD service in Azure DevOps, defined in YAML and run on Microsoft-hosted or self-hosted agents.
GitHub ActionsChoose it if your code is on GitHub, or you are consolidating on GitHub and want its marketplace and pull request experience. It deploys to Azure well too.
GitLab CI/CDChoose it if you want one integrated platform outside the Microsoft ecosystem, including registry and security scanning.
JenkinsChoose it for heavily customised or isolated environments where you need complete control and have people to operate it.
ArgoCD or Flux for AKSChoose a GitOps controller for the deployment step to a cluster, with Azure Pipelines handling build and test.

Tools we use alongside Azure Pipelines

Azure DevOps BoardsAzure ReposAzure ArtifactsAzure Container RegistryAzure Key VaultAzure Kubernetes ServiceTerraformBicepHelmArgoCDTrivySonarQube

Frequently asked questions

What is Azure Pipelines?
Azure Pipelines is the build and release service in Azure DevOps. You define pipelines in YAML, or in the classic visual editor, and agents run them to build, test and deploy to Azure, other clouds, Kubernetes or on-premises targets. It integrates with Azure Repos, GitHub and other source providers.
How do we secure Azure Pipelines service connections?
Use workload identity federation so the pipeline obtains short-lived tokens without a stored client secret. Scope each connection to the specific subscription or resource group it needs, restrict which pipelines may use it, and require approvals on environments that use production connections.
YAML pipelines or classic release pipelines?
Prefer YAML. It is versioned with the code, reviewable in pull requests, reusable through templates and supported by newer features. Classic release pipelines still work but are harder to audit and reuse. We migrate classic pipelines gradually, starting with the ones that change most often.
Should we use Microsoft-hosted or self-hosted agents?
Microsoft-hosted agents need no maintenance and give each job a clean machine, so start there. Choose self-hosted agents for private network access, specialised tooling, larger machines or very high volume, accepting that you must patch, scale and isolate them yourself.
How do we enforce standards across many pipelines?
Use YAML templates with extends. A central template defines required stages such as scanning, and individual pipelines extend it. Combined with environment checks that require the template, teams get flexibility in their steps without being able to skip mandatory controls.
Can Azure Pipelines deploy to AKS?
Yes. Common approaches are pushing images to Azure Container Registry and deploying with Helm or manifests from the pipeline, or committing a version change to a git repository that ArgoCD or Flux then applies. The second approach avoids giving the pipeline direct cluster credentials.

Talk to an engineer about Azure Pipelines

Book a free 30-minute call. We review your current setup and tell you honestly whether and how we can help.

Written by Saddique Khan, DevOps / SRE / Cloud Consultant Engineer. Last updated 2026-10-09.