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.
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.
Enter the URL of a public GitHub repository