PatchRemediationJob - createRemediationJobWithDeployOpts


PatchRemediationJob - createRemediationJobWithDeployOpts

Description :

This command creates a Remediation Job based on all the information collected from a Patching Job result. It lets the user apply all the options from an existing deploy job to the ones generated during the Remediation Job run.

The remediation target(s) will be picked from a Patching Job run. This command returns a handle to the newly created job. This handle can be used as input to commands that need a handle to the job.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

remediationName

String

Name of the job.

jobGroupName

String

Name of a group that should contain the new remediation job(s).

paJobRunKey

DBKey

Handle to the Patching Job run whose result you want to use for remediation.

pckPrefix

String

Prefix for naming the new Batch Job/Deploy Job/Package(s).

depotGroupName

String

Name of a group that should contain the new package(s).

depJobGroupName

String

Name of a group that should contain the generated Deploy job(s).

deployJobKey

DBKey

Handle to the Deploy Job run whose options you want to use generated Deploy Job(s).

Example

This example shows how to create a Remediation Job from a Patching Job run result. It assumes that a Patching Job(pajob1) has been run:

Script


# Get Patching Job DBKey by job group name and job name.

PA_JOB_RUNKEY=`blcli PatchingJob executeJobAndWait $JOB_KEY

# Name of the new job.

REMEDIATION_JOB_NAME="remediationJob1"

# Name of the job group where the new job is going to be saved.

JOB_GROUP_NAME =`"/JobGroup"

# Name of the job group where the generated deploy job(s) and batch job is going to be saved.

DEPLOY_JOB_GROUP_NAME =`"/GeneratedGroup"

# Name of the depot group where the new package is going to be saved.

DEPOT_GROUP_NAME =`"/depotGroup"

# Specify prefix to be used in package name.

PKG_PREFIX =`"some-prefix"

# Specify option for using softlink while building package(s).

# Specify handle to an existing deploy job, whose options will be copied to the deploy jobs generated during the remediation job run.

DEP_JOB_KEY=`blcli DeployJob getDBKeyByGroupAndName "$JOB_FOLDER" "$JOB_NAME"`

DBKEY=`blcli PatchRemediationJob createRemediationJobWithDeployOpts $REMEDIATION_JOB_NAME $JOB_GROUP_NAME $PA_JOB_RUNKEY $PKG_PREFIX $DEPOT_GROUP_NAME $DEPLOY_JOB_GROUP_NAME $DEP_JOB_KEY`



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.7