<!-- Page Title -->
# Pipeline Parameters and Variables · DEVOPS-03

## Standard Metadata

- Area: Pipelines
- Owner: Cloud & DevOps group
- Last reviewed: 2026-09-09
- Next review due from: 2026-12-01
- Enforcement: Code review
- Status: Active

## Rationale

Defining parameters and variables in pipelines with clarity and consistency enables:

- Improved understanding and navigation of pipeline logic
- Reduced risk of errors due to ambiguity or missing context
- Easier reuse and scalability of pipeline templates
- Faster onboarding and maintenance across teams
- Clear separation between configurable inputs and operational logic

## Parameters

### Parameters must be explicitly and unambiguously named · DEVOPS-03.1 · **MUST** · **DEV/TEST**

The name must clearly describe the parameter’s purpose without requiring additional context, ensuring that anyone can reliably identify and reference it.

### Each parameter must be clearly and individually declared · DEVOPS-03.2 · **MUST** · **DEV/TEST**

To support clarity and prevent misinterpretation, each parameter must be declared on its own rather than embedded in compact or nested structures.

### Parameter definitions must include essential metadata · DEVOPS-03.3 · **MUST** · **DEV/TEST**

All parameters must provide the necessary context to function predictably. This includes core attributes such as identifier, type, and default behaviour / value.

### Parameter names must follow consistent naming conventions · DEVOPS-03.4 · **MUST** · **DEV/TEST**

Use a consistent casing convention (e.g. camelCase) for parameter names to ensure readability and familiarity across pipelines and projects.

## Variables

### Variables must be defined in a controlled and traceable manner · DEVOPS-03.5 · **MUST** · **DEV/TEST**

Avoid scattering variable definitions across pipeline stages. Use centralized declarations (e.g., variable groups, templates) to promote transparency and version control.

### Secure variables must be stored in approved secret management tools · DEVOPS-03.6 · **MUST** · **DEV/TEST**

Sensitive values (e.g., connection strings, API keys) **must** be stored using secure mechanisms such as:
- Azure DevOps Library Secure Files
- Secret variable within a variable group
- Azure Key Vault integration

### Variable scope must match usage context · DEVOPS-03.7 · **MUST** · **DEV/TEST**

Define variables at the most appropriate scope:

- Pipeline-level for global use
- Stage/job-level for isolated logic
- Environment-level for deployment scenarios

Avoid overly broad scoping, which can lead to unexpected overrides or conflicts.

### Variable names must use a consistent format · DEVOPS-03.8 · **MUST** · **DEV/TEST**

Use a clear naming convention such as **UPPER_SNAKE_CASE** or **camelCase**, depending on the team standard. Prefix values logically where relevant (e.g., `dbConnectionString`, `testTimeoutMinutes`).

### Common variables must be centralized for reuse · DEVOPS-03.9 · **MUST** · **DEV/TEST**

Frequent or shared values must be placed in reusable variable groups or YAML includes. This minimizes duplication and improves maintainability.
