AZ-400: Designing and Implementing Microsoft DevOps Solutions

Maintain Pipelines

Summary Maintaining Pipelines

Welcome to the concise review of pipeline health, optimization, and migration in Azure DevOps. This summary will reinforce the key concepts you need for the AZ-400 exam and real-world DevOps practices.


1. Discovering Pipeline Health

Pipeline health ensures reliable, predictable releases. Focus on tracking the right metrics and using Azure DevOps analytics tools.

Key Metrics to Monitor

MetricDescriptionExample Threshold
Build Success RatePercentage of successful builds≥ 95%
Test Pass RateRatio of passed vs. total tests≥ 98%
Mean Time to RepairAverage time to fix a broken build or test≤ 30 minutes
Flaky Test CountNumber of tests that intermittently fail0

The image is a slide titled "Discovering Pipeline Health" with a list of topics related to pipeline health monitoring, including key metrics, analytics tools, and strategies for handling flaky tests.

Analytics Tools in Azure DevOps

  • Azure DevOps Dashboards: Custom charts and widgets for real-time insights.
  • Analytics Views & Widgets: Prebuilt reports on build trends and test outcomes.
  • Azure Test Plans:
    • Organize, execute, and track test suites.
    • Integrates seamlessly with CI/CD to isolate flaky tests.

Note

Use Azure Test Plans to tag and quarantine flaky tests. Consistent test results improve confidence in your releases.


2. Optimizing Pipeline Concurrency

Concurrency controls how many jobs or tasks run in parallel. Proper tuning accelerates delivery and reduces costs.

The image is a presentation slide titled "Optimizing Pipeline Concurrency for Performance and Cost," with a list of topics related to pipeline concurrency, each marked by a colored dot.

Concurrency Concepts

FeaturePurposeExample
Parallel JobsRun multiple stages or jobs simultaneouslypool: vmImage: 'ubuntu-latest'
Agent PoolsShare agents across teams for better utilizationCreate dedicated pools for high-priority jobs
Concurrency LimitsPrevent overload and control spendingmaxParallel: 4 in YAML

Sample YAML Snippet

jobs:
- job: Build
  pool: 
    name: 'Default'
    demands:
      - ubuntu
  strategy:
    parallel: 3            # Run 3 agents in parallel
    maxParallel: 3
  steps:
    - script: npm install
    - script: npm run build

Note

Limiting maxParallel helps avoid agent contention and unexpected billing spikes.

Continually monitor queue times and agent utilization to adjust your concurrency settings.


3. Migrating Pipelines from Classic to YAML

YAML pipelines offer versioning, flexibility, and better collaboration. Follow a structured checklist for a seamless migration.

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, reasons to migrate, a pre-migration checklist, and a step-by-step migration process.

Classic vs. YAML Comparison

AspectClassic PipelinesYAML Pipelines
Definition StorageGUI-basedCode repository
Version ControlLimitedFull Git history
ExtensibilityUI ExtensionsCustom templates and parameters
CollaborationManual export/importPull requests, code reviews

Pre-Migration Checklist

  1. Inventory existing Classic pipelines and variable groups.
  2. Identify custom tasks or extensions.
  3. Review environment configurations and security permissions.

Step-by-Step Migration Process

  1. Create initial YAML file
    • Export existing pipeline settings as reference.
  2. Reproduce Classic settings
    • Define pools, variables, triggers, and tasks in YAML.
  3. Validate incrementally
    • Run small sections of the pipeline using az pipelines run.
trigger:
  branches:
    include:
      - main

variables:
  - name: buildConfiguration
    value: Release

jobs:
- job: BuildAndTest
  pool: 'azure-pipelines'
  steps:
    - task: DotNetCoreCLI@2
      inputs:
        command: 'build'
        projects: '**/*.csproj'
    - task: DotNetCoreCLI@2
      inputs:
        command: 'test'
        projects: '**/*Tests.csproj'

Warning

Watch for YAML indentation and syntax errors. A single space can break your pipeline!


By mastering pipeline health metrics, optimizing concurrency, and migrating Classic to YAML pipelines, you'll be fully prepared for the AZ-400 exam and ready to enhance your organization’s DevOps workflows.

Watch Video

Watch video content

Previous
Design and implement a retention strategy for pipeline artifacts and dependencies