Author : MD TAREQ HASSAN | Updated : 2021/10/26

What is Variable Group

Creating Variable Group

Creating variable group in Azure DevOps

Using Variable Group in Pipeline

variables:
- group: demo-vg # contains foo & var variables


# use variables: foo & bar
# if foo and bar are not secret type variable then -> foo & bar will be available to pipeline tasks ar environment variables

# ... ... ...

Linking KeyVault Secrets to Variable Group

Prerequisites

Creating Variable Group

Linking KeyVault Secrets

Linking KeyVault Secrets to variable group in Azure DevOps

Using KeyVault Secrets to Pipeline Task

variables:
- group: kv-secret-vg # variable group linked to KeyVault secrets


jobs:
- job: DemoJob
  displayName: Demo Job
  continueOnError: false
  steps:
  - task: DemoTask@1
    inputs:
	  # ... ... ...
  env:
	DEMO_ID: $(x-id)
	DEMO_PASS: $(x-password)


# ... ... ...