DeployJob - createDeployJob


DeployJob - createDeployJob

Description :

This command creates a basic Deploy Job for a BLPackage. The most fundamental feature of a basic Deploy Job is that the job is automatically reset should it fail. See a similar command, createDeployJob , to create an advanced Deploy Job. Also, see the command createDeployJob to create an advanced Deploy Job with various job options.

The argument groupId is the ID of the parent depot group containing the Deploy Job. Use a command like groupNameToId to determine this ID. The group ID used must be a job group, otherwise a group not found error will occur.

The argument packageKey provides the handle to the BLPackage to be deployed. Use the command getDBKeyByGroupAndName to get this handle.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

deployJobName

String

Name assigned to this Deploy Job.

groupId

Integer

ID of the job group where this job is saved.

packageKey

DBKey

Handle associated with the BLPackage for this Deploy Job.

serverName

String

Server where you want to run this job.

isSimulateEnabled

Boolean

True indicates the job should include a Simulate phase, during which a dry run is performed without actually deploying the package.

isCommitEnabled

Boolean

True indicates the job should include a Commit phase, during which the package is actually applied to the target server.

isStagedIndirect

Boolean

True indicates the package is delivered to a server functioning as a repeater. During the Commit phase, the package is actually applied to the target server.

Example

In the following example, a basic Deploy Job includes a Simulate phase, which runs first, followed by a Commit phase. This job specifies a server group as its target.

Script


JOB_GROUP_NAME=/deploys

TARGET_SERVER=winserv1

TARGET_GROUP="/east/windows servers"

DEPLOY_JOB_NAME="deploy base files"


SIMULATE=true

COMMIT=true

INDIRECT=false


DEPLOY_OPTS="$SIMULATE $COMMIT $INDIRECT"



PACKAGE_KEY=`blcli BlPackage  [getDBKeyByGroupAndName|DeployJob - getDBKeyByGroupAndName] /basefiles "base files"`

GROUP_ID=`blcli JobGroup  [groupNameToId|JobGroup - groupNameToId] "${JOB_GROUP_NAME}"`

DEPLOY_JOB_KEY=`blcli DeployJob  [createDeployJob|DeployJob - createDeployJob] "${DEPLOY_JOB_NAME}" $GROUP_ID $PACKAGE_KEY $TARGET_SERVER $DEPLOY_OPTS`

DEPLOY_JOB_KEY=`blcli Job  [addTargetGroup|Job - addTargetGroup] $DEPLOY_JOB_KEY "${TARGET_GROUP}"`



 

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