Built in variable substitution

Any variable (${Variable}) used in the orchestration will be evaluated according to the following rules.

Default variables

The following built-in variables may be set in task parameters or job parameters[1], and will be resolved at run time to the value set for that run in the target environment:

Variable Meaning
${SERVER} Server name
${INSTALLATION} Installation Name
${CONFIGURATION} Configuration Name
${BUILD_STORE} The local storage location (build store)
${ARCHIVE_NAME} The current deployment package name
${ARCHIVE_FILE} The path to the deployment package in the build store.
${ARCHIVE_ROOT} The path to the expanded deployment package in the remote temporary directory.
${USER_NAME} The current user. This is the user that is running the RapidDeply orchestration process, so either the Ssh user or the user owning the agent process.
${USER_HOME} The current user home directory.
${JAVA_HOME} The current java home used by the RapidDeploy process.
${MV_HOME} The current MidVision home directory (only set for remoting agents).
${PROJECT_NAME} The current project name.
${JOB_ID} The current job Id.
${JOB_USER} The current job requester user name.
${TASK_NAME} The current task name.
${TMP_DIR} The current jobs temporary directory.
${MV_PID} The current jobs process id.
${MV_HOSTNAME} The current jobs hostname.
${MV_UUID} A unique ID e.g. 216fabd1-829d-4d36-a48d-b4910733f1f8
${MV_DATE_MILLIS} The current date/time in milliseconds. e.g. 20140917084017412 (yyyyMMddHHmmssSSS)

[1] - Applies to all string parameters in any RapidDeploy task.

Output Parameters

You can use further user-defined output parameters. Some tasks can define 'Output parameters' which are the result of the task execution. These parameters may be referenced in any fields of any subsequent tasks.

Output parameters should not be set to the names of any of the default built-in variables.

You need to name the output parameter with the following pattern: ${outputParam} where "outputParam" can be changed to any string. In the subsequent tasks, ${outputParam} can be used as an input parameter. Note that multiple output parameters defined with the same name with result in overriding the output parameter with the last value.

You can set output parameters in script execution tasks e.g.: CommandRunnerWithResponse task in the Execute section (contained by the Generic-Scripts plugin).

Java Properties

Where you reference a parameter that does not match a built-in variable or an output parameter, then the system will next try to reference this as java property. If the variable name matches a Java Property set in the deployment, then this property value will be used at runtime.

System Environment Variables

Where you reference a parameter that does not match a built-in variable, an output parameter or a java property, then the system will next try to reference this as an operating system environment variable. If the variable name matches an environment variable set or inherited in the shell of the running deployment process, then this environment variable value will be used at runtime.