1

Is it possible to create a Release Pipeline Variable or Variable group based on a file in your repo.

My use case is that we use liquibase to update Databases on SQL server in azure. In order parallelize this, we use a variable group containing the name of each Database (e.g. db1, db2, db3) this way when we execute the pipeline it will spin up an agent for each DB and run in parallel. This works great, but it means everytime Dev/Ops add a new DB they have to remember to go into the pipeline and add the new DB to the relevant variable group.

I would like to have a file in our git repo that we can populate the variable/variable group from so the engineers only need to amend a text file and commit it to the repo without navigating the Pipeline UI.

Andy Kelly
  • 11
  • 1
  • When you say `[the pipeline] will spin up an agent for each DB` have you explicitly called out the variable name in the pipeline jobs or stages? Wouldn't someone still need to define a job/stage that knows it should be using the new variables? – Josh Gust Feb 08 '19 at 14:56

1 Answers1

1

You should be able to do this with a mixture of a build pipeline and a custom PowerShell task that calls the Variablegroups - Update API.

Matt
  • 3,658
  • 3
  • 14
  • 27