DeployJob - undoDeployWithApproval

DeployJob - undoDeployWithApproval

Description :

This command performs an undo (that is, a rollback) of a successful Deploy Job after receiving an approval. For an undo to succeed, rollback must have been enabled on the job when it was originally executed. This command can only roll back the latest run of a Deploy Job. The execution of the job will start only after the approval is received.

The argument deployJobKey is the handle to the Deploy Job you want to undo. To find the jobKey, use the getDBKeyByGroupAndName command.

Return type : com.bladelogic.om.infra.app.service.job.JobRunKey

Command Input :

Variable Name

Variable Type

Description

deployJobKey

DBKey

Handle of the Deploy Job you want to undo.

approvalId

Integer

Approval ID to be attached to the job.

Example

The following example performs an undo of a Deploy Job. 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` 

JOB_APPROVAL_ID=`blcli Job createApproval 2 2 "My change" 2 3 "" ""` 

DeployJob undoDeploy $JOB_KEY $JOB_APPROVAL_ID 



Was this page helpful? Yes No Submitting... Thank you

Comments