Azure Devops - How to use classic pipeline variable group in YAML pipeline
Hi All!
When we need to use a group of variables in a pipeline, we can go for variable group instead of variables. The main usage of variable group is that can be used it across multiple pipelines in the same project.
For example, I have a below variable group in my azure Devops.
By default variable groups can be used across classic pipelines without any explicit permission granted but that variable group could not be used by YAML pipelines typically.
So, How how can I use that variable group in my YAML pipeline?
We can achieve it through "Pipeline permissions" option on top of variable group page. In the below image, I grant permission to my dotnet6app YAML pipeline to use variable group
We can revoke if we don't need a YAML pipeline should not access variable group as below.
Now, I want my all pipelines should use variable group. I don't want manual intervention for my future creation pipelines as well. so, we can grant "open access" - which grants permission to all YAML pipelines of the project.
Comments
Post a Comment