Importing and exporting applications
BMC Release Process Management version 4.6 and later releases provide the ability to import and export applications as JSON or XML file types. This functionality makes it possible to move objects between instances of BMC Release Process Management without the need to re-create templates, automations, and other necessary objects. All objects associated with a particular application are imported or exported in a JSON or XML format, including objects associated indirectly with the application (for example, through request templates).
This topic consists of the following sections:
Application import and export considerations
When importing or exporting applications, consider the following:
- An import operation creates new objects that do not appear and are an additive overwrite for most other objects. The steps of procedures and request templates and the stages of routes appear in the imported file exactly as they are in the source file.
- Before you can import an application, you must be a member of a team that has ownership of that application.
- You must have import permissions before you can import an application. Custom roles for the team that owns the application are used to grant import permissions to team members with that role assigned.
- Objects in the Draft state are not exported.
- If you import an application that has the same name as an existing application, the existing application is updated (replaced with the new values) during the import operation.
Application export with automation scripts
In BMC Release Process Management version 4.6.00.01 and later releases, you can export an application with active automation scripts of types Automation and Resource Automation. When you indicate to include automations in the exported application, scripts with an Automation type are exported and imported together with all of their automation scripts of type Resource Automation.
When you export an application, you can select some components that you want to export with the application. Among these components are Request Templates and Automations.
- If you select to export both Request Templates and Automations with the application, the scripts of type Automation that are used only in the exported application's request templates are exported with the application. Any Resource Automation scripts for these Automation scripts are also exported.
- If you select to export only Request Templates, but not Automations, the export file will include the request templates details; however, automation scripts (either of type Automation or Resource Automation) are not included in the export file.
Automations in the Pending, Released, and Retired states are included in the export file. Automations in the Draft or Archived state are not included in the file.
Application import with automation scripts
In BMC Release Process Management version 4.6.00.01 and later releases, you can import the automations used in request templates, including automations of types Automation and Resource Automation. Automation must be enabled for the import operation to succeed. If automation is not enabled when you attempt to import automations, an error message appears.
If the import file contains Resource Automation scripts that do not exist in BMC Release Process Management, the Resource Automation scripts are created during the import operation using the details described in the import file. If the import file contains Resource Automation scripts that already exist in BMC Release Process Management, but the existing scripts' details are different than those in the import file, then during the import operation the existing details are updated (replaced) with the details described in the imported file.
The following table describes the actions taken for automation details during an import operation:
Details | Import Action | Notes |
---|---|---|
Render ID | Same | The Render ID is not changed. |
Render as | Updated | The new render type is used for all automations of types Automation and Resource Automation that use this Resource Automation script. |
Automation status | Updated | States are Pending, Released, or Retired. |
Applied template | Updated | If the automation script used as the Request Template does not exist in BMC Release Process Management or it exists but its type is not Template, the Applied template attribute is ignored during the import operation. |
Resource Automation integration server | Updated | If the imported Resource Automation scripts contain integrations with the same name and Server Type as an existing integration, then the existing integration is updated (replaced with the new value). If the scripts contain integrations that do not exist, then the integrations are created and all required automations and resource automations are linked to the newly created integrations. |
Script body | Updated | The script body is updated even if the script is already used in some requests, request templates, and procedures. |
Script type | Updated | Template, System, User |
Automation script parameters | Updated | The parameters are updated even if the script is already used in some requests, requests templates, and procedures. |
Mapped to | Updated | Changed to imported value. |
Understanding how import operations work
Import operations result in the following actions, depending on specific conditions:
- Objects in the import file replace existing objects in the target environment.
- Imported objects are added to existing objects of the same type in the target environment.
- Objects are not imported.
BMC Release Process Management supports the following types of import operations:
- Complete overwrite — Existing objects are completely replaced by the imported objects in the JSON or XML file. For example, properties with the same name are entirely overwritten by the properties in the XML file.
- Additive overwrite — Imported objects are added to existing items of the same type; existing items are not replaced. For example, when a component with two properties (comp1 and comp2) is imported over a component with one property (comp3), the component has three properties (comp1, 2, and 3) when the import operation is complete.
The following table identifies how import operations work for specific objects:
Item | Imported JSON or XML file | Imported | Overwrite type |
---|---|---|---|
Automations | Includes automations but automations are | No, | NA |
Includes automations and automations are | Yes | Complete | |
Includes resource automations that are associated | Yes | Complete | |
Component | Includes component properties that might | Yes | Additive |
Deployment | Includes deployment windows with an end date | No | NA |
Includes environments' deployment policies | No | NA | |
Includes environments' deployment policies | Yes | Complete | |
Environments | Includes a deployment policy (open/closed) | Yes | Additive |
Includes a deployment policy that is the | Yes | Complete | |
Objects | Includes objects with the same name as | Yes | Complete |
Properties | Includes properties with the same name as | Yes | Complete |
Includes properties with a different name | Yes | Additive | |
Includes properties that do not exist on the | Yes | Additive | |
Includes properties that exist on the target | No | NA | |
Package | Includes an associated server that does not | No | NA |
Procedures | Includes procedures | Yes | Complete |
Procedure | Includes procedure steps | Yes | Complete |
Request templates | Includes request templates | Yes | Complete |
Request template | Includes request template steps | Yes | Complete |
Routes | Includes routes | Yes | Complete |
Route | Includes route stages | Yes | Complete |
Server level | Includes server level instances and the parent | No | NA |
Includes server level instances and the parent | Yes | Complete |
To export an application
- From the Applications tab or from Dashboard > My Applications, click the appropriate application from the applications list.
- Click the Export Application link at the right side of your screen.
The Application Export dialog box opens. Add or remove the following items from the export file:
- Deployment windows servers
If you choose not to export servers, the server-level instances associated with these servers are also not exported. Request templates
If you choose to export request templates, you can optionally choose to export automations.- Automations
- Deployment windows servers
- In the File Format field, select the format in which you want to export the application, either XML or JSON format.
- Click Export.
- Specify the directory path to which you want to save the exported file, and then click OK.
To import an application
- Click the Applications tab.
- Click Import Application.
- Click Browse to locate the JSON or XML file to be imported.
- Select the appropriate team to which you want to associate the application JSON or XML file.
- Click Import Application.
Related topics