DeployJob - undoDeploy_1
DeployJob - undoDeploy
Description :
This command performs an undo (that is, a rollback) of a successful Deploy Job on a given target server. For an undo to succeed, rollback must have been enabled on the job when it was originally executed. This command first finds the latest job run where this target server was used, and then rolls back this job run. If approval is enabled for the job type use the other command which takes in approval ID as an additional input.
The argument deployJobKey is the handle to the Deploy Job you want to undo. To find the jobKey, use the getDBKeyByGroupAndName command.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
deployJobKey | DBKey | Handle to the Deploy Job you want to undo. |
serverName | String | Name of the target server where the Deploy Job ran. |
Example
The following example performs an undo of a Deploy Job on server engwin2k3agt1. The Deploy Job in this example has a name of deployconfig, and resides in job group /deploys.
Script
JOB_KEY=`blcli DeployJob [getDBKeyByGroupAndName|DeployJob - getDBKeyByGroupAndName] /deploys deployconfig`
DeployJob undoDeploy $JOB_KEY "engwin2k3agt1"