Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Scripts


An automation author can write scripts in the BMC Release Process Management application to control and execute a part of or an entire application. The automation author writes a script and assigns it to one or more steps. At runtime, the script has a header appended to it with framework routines to facilitate the authoring process. In BMC Release Process Management, scripts are written in Ruby.

Note

In BMC Release Process Management, you must use scripts to run automation. The supported automation processes are BMC BladeLogic Server Automation, Hudson (experimental only), and Secure Shell. The system contains a library of scripts that is available from a link, Import from Library for each of the automations. You can modify an existing script to fit your requirements, or you can write your own script. The scripts are in Ruby or Jython, depending on the automation.

You might see the following screen in BMC Release Process Management. Visit Environment > Automation, and click any of the automation tabs. Then click to open any script in the list. Shown in the figure is a BMC BladeLogic Server Automation script.

AutomationScreen.gif

A part of a sample script
 ###
 # user:
 # description: Login for remote server
 # password:
 # description: Password for remote server
 # private: yes
 # command:
 # description: Command to run
 # sudo:
 # description: Use sudo?
 # choices: no,yes
 # success:
 # description: term that indicates success
 ###

The upper section of the script defines the arguments in a triple-commented block so that they are not executed with the script. Arguments use yaml format, which is a simple indent and colon notation. The argument name is defined and followed with a colon (for example, user\:). Any indented lines below that are considered attributes of the argument. The description attribute is indented two spaces and has a description after the colon. Here, the password argument has a private attribute. It masks the value of the password on entry and display to all but the coordinator and deployer. The private arguments are also encrypted (weakly) in the script run artifacts. The private properties and arguments are decrypted at runtime. Another attribute is choices, used in the sudo argument here, and indicating that a comma-separated list will be parsed into a selected pop-up at runtime. If no choice is made before runtime, the first entry is used.

Script arguments are accessed inside the script from the params dictionary. params inside a step has many entries.

Main body of a sample script
Mainbody_Script.gif

To learn about the actual automation process, see Creating-automation-processes.

 

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