Back to Blog
2 min read

Azure DevOps Best Practices - October 2022 Summary

This post summarizes best practices for Azure DevOps based on the features and improvements we have covered throughout October 2022.

Pipeline Best Practices

# Well-structured pipeline
trigger:
  branches:
    include: [main, release/*]
  paths:
    exclude: ['docs/**', '*.md']

pr:
  branches:
    include: [main]
  autoCancel: true

variables:
  - group: 'common-variables'
  - template: variables/production.yml

stages:
  - template: stages/build.yml
    parameters:
      buildConfiguration: 'Release'

  - template: stages/test.yml
    parameters:
      testProjects: '**/*Tests.csproj'

  - template: stages/deploy.yml
    parameters:
      environment: 'production'

Security Best Practices

  1. Use service connections - Avoid storing credentials in pipelines
  2. Link to Key Vault - Centralize secret management
  3. Enable branch policies - Require reviews and builds
  4. Use environments - Implement approval workflows
  5. Audit regularly - Review access and permissions

Performance Best Practices

  1. Cache dependencies - Reduce restore times
  2. Use pipeline artifacts - Share between jobs efficiently
  3. Right-size agents - Match workload to resources
  4. Parallelize tests - Speed up test execution
  5. Template reuse - Maintain consistency and reduce duplication

Governance Best Practices

  1. Environment approvals - Gate production deployments
  2. Deployment gates - Automate quality checks
  3. Secure files - Protect certificates and keys
  4. Variable groups - Centralize configuration
  5. Agent pools - Organize and manage compute resources

Azure DevOps provides a comprehensive platform for enterprise DevOps with robust security and governance features.

Michael John Peña

Michael John Peña

Senior Data Engineer based in Sydney. Writing about data, cloud, and technology.