Files
awesome-reviewers/_reviewers/azure-sdk-for-net-externalize-configuration-values.md
2025-07-03 10:48:16 +03:00

1.2 KiB

title, description, repository, label, language, comments_count, repository_stars
title description repository label language comments_count repository_stars
Externalize configuration values Store configuration values (URLs, demands, pool names) in centralized variables rather than hardcoding them inline. This improves maintainability, ensures consistency across the codebase, and simplifies future updates. When possible, group related configurations in dedicated template files or variable groups. Azure/azure-sdk-for-net Configurations Yaml 4 5809

Store configuration values (URLs, demands, pool names) in centralized variables rather than hardcoding them inline. This improves maintainability, ensures consistency across the codebase, and simplifies future updates. When possible, group related configurations in dedicated template files or variable groups.

Example:

# Instead of:
pool:
  name: $(WINDOWSPOOL)
  demands: ImageOverride -equals $(WINDOWSVMIMAGE)

# Prefer:
pool:
  name: $(WINDOWSPOOL)
  demands: $(IMAGE_DEMAND)

variables:
  - name: IMAGE_DEMAND
    value: ImageOverride -equals $(WINDOWSVMIMAGE)

For API endpoints, pipeline definitions, and other configuration values that may change over time, always use variables rather than hardcoding values directly in scripts or pipeline definitions.