Transform tool for transferring TFS 2015.3 Release Templates to VSTS
If you are moving from on-premises TFS to VSTS you might hit the same problem I have just have. The structure of a VSTS releases is changing, there is now the concept of multiple ‘Deployment Steps’ in an environment. This means you can use a number of different agents for a single environment – a good thing.
The downside this that if you export a TFS2015.3 release process and try to import it to VSTS it will fail saying the JSON format is incorrect.
Of course you can get around this with some copy typing, but I am lazy, so….
I have written a quick transform tool that converts the basic structure of the JSON to the new format. You can see the code as Github Gist
It is a command line tool, usage is as follows
In VSTS create a new empty release, and save it
Use the drop down menu on the newly saved release in the release explorer and export the file. This is the template for the new format e.g. template.json
On your old TFS system export the release process in the same way to get your source file e.g. source.json
Run the command line tool providing the name of the template, source and output file
RMTransform template.json source.json output.json
On VSTS import the newly create JSON file release file.
A release process should be created, but it won’t be possible to save it until you have fixed a few things that are not transferred
- Associated each Deployment step with Agent Pool
- Set the user accounts who will do the pre-and post approvals
- Any secret variable will need to be reentered
IMPORTANT - Make sure you save the imported process as soon as you can (i.e. straight after fixing anything that is stopping it being saved). If you don't save and start clicking into artifacts or global variable it seems to loose everything and you need to re-import
It is not perfect, you might find other issues that need fixing, but it save a load of copy typing