AZ-400: Designing and Implementing Microsoft DevOps Solutions

Maintain Pipelines

Introduction

Maintaining robust, efficient, and secure Azure DevOps pipelines is vital for continuous delivery and fast feedback loops. In this guide, you’ll learn how to:

  • Monitor pipeline health with the right metrics and tools
  • Optimize concurrency to improve throughput
  • Migrate from Classic Pipelines to YAML Pipelines

By the end of this article, you’ll have actionable strategies to keep your pipelines performing at their best.


1. Monitoring Pipeline Health

Pipeline health monitoring ensures that your builds and deployments are reliable and predictable. Key areas include:

  • Why real-time health checks matter
  • Tracking essential metrics (success rates, duration, queue times)
  • Leveraging Azure DevOps analytics and reporting
  • Identifying and reducing flaky tests
  • Integrating Azure Test Plans for systematic testing
  • Adding dependency and security scans in CI/CD
MetricWhat It MeasuresRecommended Target
Success RatePercentage of successful runs≥ 95%
Build DurationAverage time to complete a pipelineAs low as possible
Queue TimeWait time before an agent picks a job< 2 minutes
Flaky Test CountNumber of non-deterministic test failuresZero or minimal

The image is a slide titled "Discovering Pipeline Health," listing topics related to monitoring and managing DevOps pipelines, including Azure tools and strategies for handling flaky tests.

Note

Flaky tests can erode confidence in your CI/CD process. Incorporate retries and isolate tests to identify root causes quickly.

Azure DevOps Analytics & Reporting

  • Use Pipeline Analytics to visualize trends and spot regressions.
  • Configure Dashboards for at-a-glance metrics.
  • Export data to Power BI for custom reporting.

2. Optimizing Pipeline Concurrency

Running jobs in parallel can dramatically shorten build and release times. In this section, we explore:

  • How Azure Pipelines allocates agents for parallel jobs
  • Configuring concurrency limits and agent pools
  • Balancing performance with cost constraints
  • Best practices for parallelizing tasks

Concurrency Considerations

ConceptDescription
Parallel JobsMultiple build or test jobs running at once
Agent PoolsGroups of agents available for your pipelines
Concurrency LimitsMaximum number of parallel jobs per pipeline
Resource QuotasControls on CPU, memory, and licensing costs
  • Define resource demands in your YAML to match agent capabilities.
  • Use matrix strategies for running tests across multiple environments simultaneously.
  • Monitor parallel job usage to avoid unexpected billing spikes.

Warning

Exceeding your concurrency limits may queue additional jobs and increase wait times. Always review your billing model before scaling up parallelism.


3. Migrating from Classic Pipelines to YAML Pipelines

YAML Pipelines provide full version control, modular templates, and better collaboration. Follow this migration roadmap:

  1. Preparation
    • Verify permissions, extensions, and variable groups
    • Audit your existing Classic Pipelines
  2. Understand Differences
FeatureClassic PipelinesYAML Pipelines
Definition StorageGUI-based configurationCode–stored in .yaml files
VersioningManual history trackingGit-native change history
ReusabilityLimited task groupsExtensive templates and includes
CollaborationManual export/importPull requests and code reviews
  1. Step-by-Step Migration
    • Export your Classic pipeline definition
    • Convert stages, jobs, and tasks into a .yaml file
    • Validate and test your new pipeline in a feature branch
  2. Post-Migration Best Practices
    • Modularize with reusable templates
    • Implement environment-specific variable groups
    • Integrate security and dependency scanning early

The image is a slide titled "Migrating a Pipeline From Classic to YAML in Azure Pipelines," listing topics such as introduction, YAML and classic pipelines, migration reasons, checklist, process, challenges, and best practices.

Note

Test your YAML pipeline thoroughly before decommissioning the Classic version to avoid production disruptions.


References

Watch Video

Watch video content

Previous
Summary