DeployJob - addComponentToJobByJobDBKey

DeployJob - addComponentToJobByJobDBKey

Description :

This command adds a component to an existing Deploy Job.

The deployJobKey argument is a DBKey referring to the Deploy Job to be modified. The componentKey argument is a DBKey referring to the component target to be added.

This command returns a handle to the updated Deploy Job. Note that this handle is different than any existing handle to this Deploy Job. All older handles are invalid.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

deployJobKey

DBKey

Handle to the Deploy Job.

componentKey

DBKey

Handle to the component to be added to the job.

Example

The following example shows how to find a component key and add it to an existing Deploy Job.

Script





SERVER=nocdb1 

TEMPLATE_GROUP=/noctemplates 

TEMPLATE=dbconfig 

DEPLOY_JOB_GROUP=/nocdeploy 

DEPLOY_JOB_NAME=configdeploy 


SERVER_ID=`blcli Server getServerIdByName $SERVER` 

TEMPLATE_KEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE` 

DEPLOY_JOB_KEY=`blcli DeployJob getDBKeyByGroupAndName $DEPLOY_JOB_GROUP $DEPLOY_JOB_NAME` 

# there is only one component on this server so use index 0 

COMPONENT_KEY=`blcli Component getComponentKeyByTemplateKeyAndServerId $TEMPLATE_KEY $SERVER_ID 0` 


DEPLOY_JOB_KEY=`blcli DeployJob addComponentToJobByJobDBKey $DEPLOY_JOB_KEY $COMPONENT_KEY` 



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

Comments