This post is from the XebiaLabs blog and has not been updated since the original publish date.
Using XL Release Template Versioning
When working within the Continuous Delivery space, you want to apply the same principles to your Continuous Delivery tooling and pipelines as you do to your application processes. This means you'll want to set up versioning for your XL Release templates. Today I will explain several options on how to accomplish this setup.
The Easy WayXL Release has in itself the capability to export and import templates. Within the UI you can easily export a template:Once exported you'll receive a .xlr file, which is basically a zip file containing some json that describes the template. This json can easily be stored in your source safety system. If you want to import a template you can use the import functionality as also described here: https://docs.xebialabs.com/xl-release/how-to/import-a-release-template.html
The Automated WayThe REST api in XL Release makes it possible to automate the above import/export functionality. You can find the XL Release documentation describing how to do this here or you can use of some scripts we already exposed in a previous blog.
The Technical, More Challenging WayWhile "The Automated Way" is easy to implement using an existing CI tool, and it allows you to automatically import a template on each git tag using a post commit hook, you might also want to make sure that each time a template is changed, this change is automatically sent to a source safety mechanism for versioning. This can also be achieved due to the fact that XL Release supports the concept of listeners (like XL Deploy), and it only takes a small piece of code to implement. Documentation on how to do this can be found here.
Some Things To ConsiderUse template tags to define your version: That way, you can always find which template version was used for a release. By using tags, you can easily find which version was used within the Release properties.Security: Templates can also contain credentials (encrypted). When using multiple XL Release instances, it will typically not be possible to transfer these credentials from one instance to another (as that might be a potential security issue). So consider using XL Deploy to transfer templates and make use of placeholders to auto-process the credentials.
Manage the most advanced release pipelines with ease. Learn more about XL Release today!