Azure DevOps contains a feature called Variable Libraries.
Variable Libraries allow you to share a set of variables across multiple pipelines. This can save a lot of time and improve consistency, and reduce errors.
My templates require me to enter a set of values, such as Company, Department for each template. Rather than define a variable in every pipeline for these values, you can define the variables in a Variable Library and then link that library to a pipeline. You can link multiple libraries to a template allowing you to create a hierarchy of libraries.
As an example I have a variable library of standard variables that I use when deploying Azure infrastructure, that includes:
You can also have another variable library that contains variables that relate to a particular application. You can also create secrets in the library by clicking padlock icon on a variable.
From Pipelines you can then link to these libraries so the pipeline can make use of the centrally defined variables.
You can also link from a yaml pipeline using
variables:
- group: MicahStandardVariables
- group: Application-OdeToFood-Variables
You can also link variable libraries to Azure KeyVault, and add security to them to limit a libraries use by authorised users and groups.