Skip to content

CodePipelinePhaseDefinition

A phase of a code pipeline: a group of steps that runs once the phases it depends on have finished.

Kind: an object, used in requests and responses. In a request it is called CodePipelinePhaseDefinitionInput.

FieldTypeRequiredDescription
namestringThe phase’s name, unique within the pipeline.
dependsOnstring[] | nullThe phases that must all finish successfully before this one starts. Null or empty: it can start straight away.
stepsCodePipelineStepDefinitionInput[]The phase’s steps. One agent’s steps run one after another, in order; different agents’ steps run in parallel unless a step’s dependsOn says otherwise.
preHookstring | nullThe name of a hook (a Cogniscript method in the pipeline’s hooks) to run before the phase’s steps.
postHookstring | nullThe name of a hook to run after all the phase’s steps finish. Often used to read step outputs and add phases or steps.
onFailHookstring | nullThe name of a hook to run when the phase fails. It returns JSON with a decision: "continue" marks the phase skipped and carries on, "fail" fails the run as usual.
durationWarningtimespan | nullNot used by code pipeline runs.
durationAutoTerminationtimespan | nullThe longest any step in this phase may run, for steps that set no durationAutoTermination of their own. Null: the pipeline’s value applies.
durationActivityTimeouttimespan | nullHow long any step in this phase may go without activity before it is stopped, for steps that set no durationActivityTimeout of their own. Null: the pipeline’s value applies.
{
"name": "...",
"dependsOn": [
"..."
],
"steps": [
{
"name": "...",
"agentName": "...",
"targetRole": "Architect",
"targetTags": [],
"prompt": "...",
"dependsOn": [],
"isCommitable": false,
"commitRepoName": "...",
"isStructuredOutput": false,
"outputJsonSchema": "...",
"isOutputSchemaRequired": false,
"outputVariableName": "...",
"outputFileName": "...",
"preHook": "...",
"postHook": "...",
"onFailHook": "...",
"isNewSession": false,
"runChallengeLoop": false,
"durationWarning": "00:05:00",
"durationAutoTermination": "00:05:00",
"durationActivityTimeout": "00:05:00"
}
],
"preHook": "...",
"postHook": "...",
"onFailHook": "...",
"durationWarning": "00:05:00",
"durationAutoTermination": "00:05:00",
"durationActivityTimeout": "00:05:00"
}

Every field is present in a response; empty ones are null.

FieldTypeDescription
namestringThe phase’s name, unique within the pipeline.
dependsOnstring[] | nullThe phases that must all finish successfully before this one starts. Null or empty: it can start straight away.
stepsCodePipelineStepDefinition[]The phase’s steps. One agent’s steps run one after another, in order; different agents’ steps run in parallel unless a step’s dependsOn says otherwise.
preHookstring | nullThe name of a hook (a Cogniscript method in the pipeline’s hooks) to run before the phase’s steps.
postHookstring | nullThe name of a hook to run after all the phase’s steps finish. Often used to read step outputs and add phases or steps.
onFailHookstring | nullThe name of a hook to run when the phase fails. It returns JSON with a decision: "continue" marks the phase skipped and carries on, "fail" fails the run as usual.
durationWarningtimespan | nullNot used by code pipeline runs.
durationAutoTerminationtimespan | nullThe longest any step in this phase may run, for steps that set no durationAutoTermination of their own. Null: the pipeline’s value applies.
durationActivityTimeouttimespan | nullHow long any step in this phase may go without activity before it is stopped, for steps that set no durationActivityTimeout of their own. Null: the pipeline’s value applies.
{
"name": "...",
"dependsOn": [
"..."
],
"steps": [
{
"name": "...",
"agentName": "...",
"targetRole": "Architect",
"targetTags": [],
"prompt": "...",
"dependsOn": [],
"isCommitable": false,
"commitRepoName": "...",
"isStructuredOutput": false,
"outputJsonSchema": "...",
"isOutputSchemaRequired": false,
"outputVariableName": "...",
"outputFileName": "...",
"preHook": "...",
"postHook": "...",
"onFailHook": "...",
"isNewSession": false,
"runChallengeLoop": false,
"durationWarning": "00:05:00",
"durationAutoTermination": "00:05:00",
"durationActivityTimeout": "00:05:00"
}
],
"preHook": "...",
"postHook": "...",
"onFailHook": "...",
"durationWarning": "00:05:00",
"durationAutoTermination": "00:05:00",
"durationActivityTimeout": "00:05:00"
}