Import a release template

You can use templates to model the ideal process of a release flow. You can import a template from:

  • an .xlr file that was previously exported from Release.
  • an exported .zip file. The exported .zip file contains Releasefile (Releasefile.groovy).

Note: If a template was exported from a version of Release prior to 4.0.0, you can import a .json file.

Import templates from the GUI

To import a template:

  1. Use one of the following methods:

    • Go to Design > Templates and click Import.

      • The template will be imported in the root level.
    • From the navigation pane, click Folders, select a folder, and click Templates > Add template > Import template.

      • The template will be imported in the selected folder.
  2. Click Browse and browse to the .xlr or .zip file.
  3. Click Import. Note the following:

    • If the .xlr template contains references to objects that do not exist on the server (for example, Deploy servers or gate dependencies), Release removes the references and shows a warning message.
    • If you import a template that contains release triggers, the triggers will be disabled.

Import templates from the REST API

You can also use the Release REST API to import templates. For templates that were exported from Release 4.0.0 and later, ensure that you use the importTemplateAsXlr endpoint.

To import the templates in a specific folder, you should include the folder ID in the REST call. If you leave out the folder ID, it will be imported at the root level. For example:

curl -u admin:<admin password> "Content-type: Content-type: multipart/form-data" http://desktop-fru5pi8:5516/api/v1/templates/import?folderId=Applications/Folderfd2044f20db94b17affab9a1a934f1fd --form

Create templates from the CLI

You can also use the XL CLI with DevOps as Code to model your Release templates in YAML files. For more information, see Manage release templates as code.