Last Updated Mar 26, 2015 — DevOps Expert
DevOps

Recently we had a question from a user who wanted to be able to import and export all of his XL Release templates at the same time. Fortunately we were able to provide them with this small collection of scripts to do just that. The source code is on the XebiaLabs community Gists site.
This project consists of three scripts as follows:

  • getTemplateIds.sh
  • bulkExportTemplates.sh
  • bulkImportTemplates.sh

Let’s see what each utility does. Before we import or export any templates from XL Release we need to get a list of Template IDs in the system. The getTemplateId.sh script will export a list of templates and put them in a file templatesToExport.txt in the same directory.getTemplateId.sh takes several command line options, as follows:

  • –user: The XL Release user name. (default = admin)
  • –password: The XL Release users password (default = admin)
  • –hostname: The host that XL Release is running on (default = localhost)
  • –port: The port XL Release is listening on.  (default = 5516)
  • –protocol: The protocol XL Release is using (http/httops).  (defualt = http)

Once getTemplateId.sh is run, all of the XL Release templates will be listed in the templatesToExport.txt file. At this point you can execute bulkExportTemplates.sh to export all of the templates from the XL Release server to an export directory under the current directory. The command line options for the bulkExportTemplates.sh script are the same as the getTemplateIds.sh script.
With a group of templates exported from XL Release, they can now be imported into an XL Release instance using the the bulkImportTemplates.sh script. The bulkImportTemplates.sh script takes the same command line parameters as the getTemplateId.sh script above. If you try to import a copy of an existing XL Release template, XL Release will create a “copy” of the template so even if you type to import a template of the same name you will not lose either one.
The scripts can be found at xlr-template-import-export-util in the XebiaLabs community Gists site.Important: The code here is sample code only that is not officially supported by XebiaLabs. If you have questions, please contact our support team.

Are you ready to scale your enterprise?

Explore

What's New In The World of Digital.ai

August 4, 2023

Why Financial Services Need DevSecOps More Than Ever

With Digital.ai DevSecOps solutions, financial organizations can improve their security posture, meet regulatory requirements and focus on delivering innovative financial products.

Learn More
June 23, 2023

Governance and Compliance for DevOps at Scale

Implement a Software Chain of Custody in DevOps for compliance, traceability, and cost reduction. Gain visibility and automate processes with Digital.ai Release & Deploy.

Learn More
April 10, 2023

Continuous Delivery Implementation Done Right: Learn from National Broadband Ireland Story

Through NBI’s approach to be the best open-access operator in telecom, they have been supported by key technology partners, with automation capabilities provided by Digital.ai Release and Deploy underpinning integral aspects.

Learn More