RLM deploy package instance by component version


You can use this automation script to deploy the specified package instance from BMC Release Package and Deployment (RPD) by using BMC Release Process Management (RPM). 

For this script to work, you must create an analyzer  with the RPM Version Tag module, add it to the required package, and create an instance of this package in RPD. When a package instance is created (for example, by Jenkins), a corresponding component version tag is generated in RPM and you can use it to create a release in the BMC Release Lifecycle Management Requester UI (now called Release Process Management - Requester UI, 5.0.03.001 onward) and deploy the required package to the existing environments in the release.

The component version tag created by RPD has higher priority than the version tags that are specified at the application or request template level in RPM.

Note

For the script to run properly, in RPM, you must select the Limit versions to metadata check box in System > Settings > General.

Inputs required while creating a step

To use this automation script in a step, the following inputs from RPD are required:

  • Package: Select in a list of packages present in the database of RPD. You must select that package whose associated instance you want to deploy.
  • Route: Select in a list of routes present in the database of RPD. The list of routes is displayed depending on the instance you select.

    Note

    To deploy requests without changing the script parameters to different environments in a stage, the route created in RPD must be of the Open type. For more information, see Creating-and-managing-routes.

  • Environment:  A list of environments is populated when you select a route. You can select the route in a list of environments associated with the selected route.

    Notes

    • If an environment name used in the request of the step matches the environment name in RPD, then such environment is selected by default in the step and is suffixed with the text (inherited from request).
    • If you do not have any environments with the inherited from request label, then when editing step details, in the Environment list of the Automation tab, you will have the Next option, which you can select to promote to the next environment in the route. When you select the Next environment, then automation is executed in the following way:

      • (For the Strict routes in RPD) In each environment in the exact order of environments as in the route. 
      • (For the Mixed routes in RPD) In the first environment if it is not grouped, and then on the last environment from the grouped environments.
      • (For the Open routes in RPD) Only on the last environment in the route and the route will be completed.
  • Channels: Select the channel for the deployment in the list. A list of channels is populated when you select an environment.

    Note

    In automation scripts, channels for RPD are available only if you integrate with RPD 4.3.01.09 or later.

  • Log Format:  Select the format of the logs returned by the deploy operation from RPD.

    Note

    In automation scripts, log format for RPD is available only if you integrate with RPD 4.3.01.09 or later.

  • Set Properties:  This item is displayed only when you select an instance. The table displayed provides a list of properties that are associated with the selected instance on RPD. You can select one of these properties and override its value with a property value in RPM. For this, you must first create a mapping of properties in RPM with that on RPD. For more information, see Setting-property-values-for-a-package-repository-or-instance.

    Note

    The property values are overridden for the package, not an instance, in RPD.
    If you integrate with RPD 4.4.00.07 and later, the property values are overridden for the instance in RPD. To use this functionality, reimport the RLM deploy package instance by name automation script.

Expected results after running this automation script

Note

The following results are only available if the step is completed successfully. If there are errors and the package instance deployment fails, then the step goes into a problem state and the errors are displayed on the Notes tab in the step.

 After you run this script, you can expect to see the following results on the Automation tab if the step:

  • Deployment Log File: Contains log details about the package instance deployment. This file contains log details that are originally generated in RPD. You can download the file from RPM.
  • Deployment Log URL: Provides a URL that takes you to the location where the deployment log file is available in RPD.

Associated data retriever scripts

The RLM deploy package instance by name automation script uses the following data retriever scripts:

Data retriever script

Description

RLM packages

This script is used for retrieving packages that already exist in the RPD database. The data retrieved by this script is displayed as a list when you add a step in RPM.

RLM routes

This script is used for retrieving data about routes that already exist in the RPD database. The data retrieved by this script is displayed as a list when you add a step in RPM.

RLM route environments with next

This script is used for retrieving data about environments associated with the selected route. If a step does not contain inherited environments, the script also provides the Next option in the Environment list of the Automation tab in the step, which you can select to promote to the next environment in the route. The data retrieved by this script is displayed as a list when you add a step in RPM.

RLM environment channels

This script is used for retrieving data about channels associated with the selected environment from the RPD database. The data retrieved by this script is displayed as a list when you add a step in RPM.

Note: In automation scripts, channels for RPD are available only if you integrate with RPD 4.3.01.09 or later.

RLM package properties

This script is used for retrieving data about properties associated with the selected package from the RPD database. The data retrieved by this script is displayed as a table of properties with corresponding values.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*