DeployJob - createSoftwareDeployJob
DeployJob - createSoftwareDeployJob
Description :
This command creates a basic Software Deploy Job for a depot software object.
The argument groupId is the ID of the parent depot group that contains 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 objectKey provides the handle to the BLPackage to be deployed. Use the command getDBKeyByTypeStringGroupAndName to get this handle.
The argument modelType provides the type of software to be deployed. The following is a list of software installables that are valid depot objects:
- AIX_PATCH_INSTALLABLE: AIX patch
- AIX_PACKAGE_INSTALLABLE: AIX package
- HP_PRODUCT_INSTALLABLE: HP-UX product
- HP_BUNDLE_INSTALLABLE: HP-UX bundle
- HP_PATCH_INSTALLABLE: HP-UX patch
- RPM_INSTALLABLE: Linux RPM
- DEBIAN_PACKAGE_INSTALLABLE: Debian Package
- SOLARIS_PATCH_INSTALLABLE: Solaris patch
- SOLARIS_PACKAGE_INSTALLABLE: Solaris package
- HOTFIX_WINDOWS_INSTALLABLE: Windows HotFix
- SERVICEPACK_WINDOWS_INSTALLABLE: Windows Service Pack
- MSI_WINDOWS_INSTALLABLE: Windows MSI Package
- INSTALLSHIELD_WINDOWS_INSTALLABLE: Windows InstallShield Package
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
deployJobName | String | Name of this Deploy Job. |
groupId | Integer | ID of the job group where this job is saved. |
objectKey | DBKey | The DBKey of the depot software object. |
modelType | String | The type of software being deployed. |
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 Software 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 Windows Hotfix"
SIMULATE=true
COMMIT=true
INDIRECT=false
SOFTWARE_TYPE=HOTFIX_WINDOWS_INSTALLABLE
DEPLOY_OPTS="$SIMULATE $COMMIT $INDIRECT"
SOFTWARE_KEY=`blcli DepotObject [getDBKeyByTypeStringGroupAndName|DepotObject - getDBKeyByTypeStringGroupAndName] $SOFTWARE_TYPE /Depot "WindowsXP-KB920683.exe"`
GROUP_ID=`blcli JobGroup [groupNameToId|JobGroup - groupNameToId] "${JOB_GROUP_NAME}"`
DEPLOY_JOB_KEY=`blcli DeployJob [createSofwareDeployJob|DeployJob - createSoftwareDeployJob] "${DEPLOY_JOB_NAME}" $GROUP_ID $SOFTWARE_KEY $SOFTWARE_TYPE $TARGET_SERVER $DEPLOY_OPTS`
DEPLOY_JOB_KEY=`blcli Job [addTargetGroup|Job - addTargetGroup] $DEPLOY_JOB_KEY "${TARGET_GROUP}"`