Routines for local ruby scripts - Documentation for BMC Release Process Management 5.0.08

set_property_flag

Updates a property in a step of a request in BMC Release Process Management. If the property name specified in the step is not present in the database, error should be sent.

Note: Only for Ruby-based automation scripts.

Example:

# Creating and Updating an existing environment component property in the step:
properties = "name, value, environment, component, global, private\n"
properties += "Property 01, Script Value 01, Env 01, Comp 01, false, false\n"
properties += "Property 02, Script Value 02, Env 01, Comp 02, true, true\n"
properties += "Private Property 03 New, Script Value 03, Env 01, Comp 01, true, true\n"
set_property_flag(properties)
# Creating a new global property:
createProperty = "name, value, global, private\n"
createProperty += "Private Property 04 New, Script Value 04, true, true\n"
set_property_flag(createProperty)

set_component_flag

Creates or updates application components in BMC Release Process Management.

Note: Only for Ruby-based automation scripts.

Example:

myComponents = "name, version, environment, application\n"
myComponents += "Comp 01 TC864125, Comp Version 01 TC864125, Env 01 TC864125, App 01 TC864125\n"
myComponents += "Comp 03 New TC864125 , Comp Version 03 TC864125, Env 01 TC864125, App 01 TC864125\n"
set_component_flag(myComponents)

pack_response

Updates values for output arguments. You can use this routine for updating only one output argument value at a time.

Note: This routine can be used in remote shell and local shell scripts with the echo command.

You can specify this routine in the following format:

  • For Ruby-based scripts: pack_response 'outputArgumentName' 'outputArgumentValue'
  • For remote shell and local shell scripts: echo "pack_response 'outputArgumentName' 'outputArgumentValue'"

Example:

For Ruby-based scripts: pack_response 'jira_tickets' 'JPET-1: Add Link, JPET-2: Add Fish Icon'

For remote shell and local shell scripts: echo "pack_response 'jira_tickets' 'JPET-1: Add Link, JPET-2: Add Fish Icon'"

run_command(..) 

Runs a specified command on the command-line of the target server. The target server refers to your local computer where BMC Release Process Management is installed and running. 

Example:

cmd = "ruby #{params["SS_script_support_path"]\}/amazon_control.rb"
args = "#{"instance_status"} #{params["aws_id"]}"
result = run_command(params, cmd, args)

You Might Also Like