Skip to content

valtynikov/azure-devops-variable-groups-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Azure DevOps YAML pipeline to backup variable groups to a Git repo

Easily backup your Azure DevOps variable groups to a Git repo on a scheduled basis using this YAML pipeline. Use the commit history to see what changed, when, and by whom.

  • Each variable group, including all metadata and variables, saved as a seprate JSON file
  • The Modified by user for each variable group is associated with the commit by the backup process
  • The default schedule is set to run every 15 minutes Mon-Fri between 9am and 5pm (UTC-05:00)

Setup

  1. Create a new Git repo in your Azure DevOps project
  2. Grant the Project Collection Build Service Contribute permission to the Git repo1

Note: Secret is to copy the user UUID from the error message and paste it into the 'Search' box - it reveals a user that is not shown on the page by default. Then just add Contribute permissions. stackoverflow.com/a/55995046/923410

  1. Commit the azure-pipelines.yml to the repo
  2. Create a new pipeline using the azure-pipelines.yml file
  3. Adjust the pipeline schedule as desired 2

1 https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/git-commands?view=azure-devops&tabs=yaml#grant-version-control-permissions-to-the-build-service

2 https://docs.microsoft.com/en-us/azure/devops/pipelines/process/scheduled-triggers?view=azure-devops&tabs=yaml

More

For additional details, please refer to my blog post: https://www.blendmastersoftware.com/blog/azure-devops-variable-groups-backup

About

Azure DevOps YAML pipeline to backup variable groups to a Git repo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published