Grouping Shared Variables in Azure DevOps Pipeline

Grouping Shared Variables in Azure DevOps Pipeline

Grouping Shared Variables in Azure DevOps Pipeline helps to organize and managing common variables across different Build and Release Pipelines. When you have multiple sets of pipelines; and many of them use common variables; instead of having variable defined for each pipeline we can leverage the feature of grouping variables

Grouping Shared Variables in Azure DevOps

Grouping Shared Variables in Azure DevOps

We can create the Variable Groups from Pipelines Library and then select + Variable Group.

Create Variable Groups

While Creating the variable group, you can choose the options to Link it with Azure KeyValuts as well as you will have an option to share the variable groups across Pipeline.

Sharing it with accross pipeline is Key as it allows same set of variables to be used across different build or release pieline.

Once the Variable group is Created, from the Release Pipelline, you can Link the Variable Group.

Go to the Build / Release Definition, Move to Variables Tabs, and then select “Variable Groups.” Under Variable Groups, you will have the option to “Link Variable Group” that will list all the Variable groups created under the Library

Variable Group can be clone very easily also you can have Team specific security access for the groups.

Overall, Azure DevOps Variable Group manages a different set of variables efficiently in a single place. This can help to share variables across pipelines as well as manage and update them quickly.

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.