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.
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.
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
To learn about the actual automation process, see Creating-automation-processes.