Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Azure DevOps–Using Variable Groups from Blog Posts - SQLServerCentral

Save for later
  • 2 min read
  • 02 Nov 2020

article-image

I was in a webinar recently and saw a note about variable groups. That looked interesting, as I’ve started to find that I may have lots of variables in some pipelines, and I thought this would keep me organized. However, these are better than that.

When I go to the variable screen for a pipeline, I see this my variables, but on the left side, I see “Variable groups”. If I click this, I see some info.:

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-0

The top link takes me to a doc page, where I see this sentence: “Use a variable group to store values that you want to control and make available across multiple pipelines.

Now that is interesting. I have been thinking about different pipelines, so having variables that work across them is good.

To create a variable group, I need to go to the Library, which is another menu item under the Pipelines area. I get a list of groups, of which I have none right now.

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-1

When I click the blue button, I get a form with the group properties, and then a variables section below.

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-2

I add a couple variables and add some group info. In this case, I want some secret values that are useful across different pipelines.

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-3

You do need to click Save at the end of this.

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at AU $24.99/month. Cancel anytime

In my pipeline, I see I have some variables. On the left, again, is a Variable groups item.

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-4

When I click that, I don’t see any, but I haven’t linked any. Here I need to link my group.

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-5

When I click this, I get a blade on the right. I can then see my group(s), and I can set a scope. I do need to click the group and then I can click link at the bottom.

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-6

Now I see the variables available in my pipeline.

azure-devops-using-variable-groups-from-blog-posts-sqlservercentral-img-7

That’s pretty cool, especially as I am starting to see separate pipelines for different downstream environments becoming more popular.

The post Azure DevOps–Using Variable Groups appeared first on SQLServerCentral.