DeployJob - setAdvanceDeployJobPhaseScheduleByDBKey

DeployJob - setAdvanceDeployJobPhaseScheduleByDBKey

Description :

This command works only with advanced Deploy Jobs. This command first clears all schedules set for this Deploy Job, then lets you set a schedule for each phase of the Deploy Job. You can also specify that specific phases not be scheduled, or indicate that the schedule should start after the previous phase.

The simulateType argument is a string that indicates how the simulate phase should be scheduled. You can set this string to one of the following values:

  • NotScheduled - Indicates the simulate phase should not occur. If you set simulateType to NotScheduled, you should set simulateDateString to a blank string.
  • AtTime - Indicates the simulate phase should start at the time you specify in simulateDateString.

The stageType argument is a string that indicates how the stage phase should be scheduled. You can set this string to one of the following values:

  • NotScheduled - Indicates the stage phase should not occur. If you set stageType to NotScheduled, you should set stageDateString to a blank string.
  • AfterPreviousPhase - Indicates that the stage phase should start after the previous phase has successfully completed.
  • AtTime - Indicates the stage phase should start at the time you specify in stageDateString.

The commitType argument is a string that indicates how the commit phase should be scheduled. You can set this string to one of the following values:

  • NotScheduled - Indicates the commit phase should not occur. If you set commitType to NotScheduled, you should set commitDateString to a blank string.
  • AfterPreviousPhase - Indicates that the commit phase should start after the previous phase has successfully completed.
  • AtTime - Indicates the commit phase should start at the time you specify in commitDateString.

The following rules apply to the use of this command: <ol>
Used for advanced Deploy Jobs only.
All time strings must be formatted as follows: YYYY-MM-DD HH:MM:SS
All provided schedule times must occur after the previous phase scheduled time.
You cannot set simulateType to AfterPreviousPhase.
If the Commit phase is disabled for the job, then the only allowable value for both stageType and commitType is "NotScheduled"
If you specify the AtTime type option for a phase, then you must provide a valid time string for this phase. If you specify any other type option, the time string is ignored -- we recommend that you use a blank string ("") for the time string in this case.
If the simulate phase is not enabled for the Deploy Job, then you must set simulateType to NotScheduled. Other settings will generate an error.
No phase can be set to AfterPreviousPhase if the previous phase is not scheduled, or will not occur.
Failures for rules 1-4 have no effect on the Deploy Job. However failures for rules 5-7 reset the Deploy Job to be in a "Do not execute" state, because by this point all existing schedules have already been removed. This command returns a handle to the updated job.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

jobKey

DBKey

The handle to the Deploy Job.

simulateType

String

Simulate phase schedule type. The string can be "NotScheduled" or "AtTime"

simulateDateString

String

One-time schedule for simulate phase. The date string must be in the format YYYY-MM-DD HH:MM:SS.

stageType

String

Stage phase schedule type. The string can be "NotScheduled", "AfterPreviousPhase", or "AtTime"

stageDateString

String

One-time schedule for stage phase. The date string must be in the format YYYY-MM-DD HH:MM:SS.

commitType

String

Commit phase schedule type. The string can be "NotScheduled", "AfterPreviousPhase", or "AtTime"

commitDateString

String

One-time schedule for commit phase. The date string must be in the format YYYY-MM-DD HH:MM:SS.

Example

The following example shows how to retrieve a Deploy Job, clear the schedules associated with it, then specify specific times at which various stages should start.

Script


# Name of the existing job. 

JOB_NAME="deployjob" 

# Job group in which Deploy Job is stored. 

JOB_GROUP="/Workspace/DeployJobs" 

# Get the Deploy Job DBKey using the above information. 

JOB_DBKEY=`blcli DeployJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME` 

SIMULATE_DATE_STRING="2005-01-01 23:35:00" 

STAGE_DATE_STRING="2005-01-01 23:45:00" 

COMMIT_DATE_STRING="2005-01-01 23:55:00" 

JOB_DBKEY=`blcli DeployJob setAdvanceDeployJobPhaseScheduleByDBKey $JOB_DBKEY AtTime $SIMULATE_DATE_STRING AtTime STAGE_DATE_STRING AtTime COMMIT_DATE_STRING` 



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

Comments