Template version control
You can use the template version control feature to track changes to a template and to revert past changes. While Release automatically tracks template changes for compliance and auditing purposes, template version control is used to save specific versions of a template and to roll back changes.
Template Version Control also enables you to label templates and to compare saved template versions by viewing them as code in the Release Releasefile format.
Enable automated template versioning
To use the version control feature, you must enable automated template versioning. By default, the automated template versioning is disabled in Release.
To enable automated template versioning:
- Go to Settings > General.
- In the Track changes in template version control section, click Enable track changes.
View template changes and save template version
To view the changes performed on a template, open the template and select Show > Version control. The version control screen displays a list of all the changes with the latest at the top.
You can filter the list by setting a start date and an end date for the changes or by specifying a user in the Filter by user… field.
To save a new template version with the latest changes:
- Click Save as new version.
- Specify a name and a description.
- Click Save. When saving a new version, all the changes between the previous version and the version which is being saved will be included into the new saved version. If tracking changes in the template version is enabled, all your changes since the last version are visible.
Restore and compare templates
To restore a template to a specific revision, click Restore from the Actions column. This creates a new change in the list that is identical to the revision you selected.
To compare two versions of a template, click the versions to select them, and then click Compare. This shows the two selected versions as code in the Release Releasefile format and highlights the differences.
Store template versions in Source Control Management
You can store template versions in a Source Control Management (SCM) tool. This provides easier management of all the artifacts, the possibility to store them together with Releasefiles and Jenkinsfiles, to configure and to use them from a release pipeline.
You can store the template versions in SCM repositories in a Releasefile with all the necessary information, including attachments. For more information, see Configure Source Control Management (SCM) connection.