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)
- Create a new Git repo in your Azure DevOps project
- 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
- Commit the
azure-pipelines.yml
to the repo - Create a new pipeline using the
azure-pipelines.yml
file - Adjust the pipeline schedule as desired 2
For additional details, please refer to my blog post: https://www.blendmastersoftware.com/blog/azure-devops-variable-groups-backup