Month: July 2018

Diff release definition environments in VSTS

Recently I had to update a release definition in VSTS and found that the tasks for releasing to the various environments were slightly different, often for options which were collapsed by default. This made manually checking both difficult and error prone. Assuming this would be a standard problem, I checked for a tool to do this but could not find one.

A release definition is just a json file and if you export it you see the environments settings (tasks, variables etc.) are stored in one big array called naturally enough environments. So you could just manually extract the ones you want and use a diff tool.

I thought I could do better. The VSTS API allows you to get the release definition and Python is so much better at automating the manipulation of json documents. Needless to say it wasn’t quite as easy as it sounded but eventually I got my VSTS diff script working. I’ve uploaded it to GitHub in case anyone has a similar problem and could find the script useful.

Advertisements