TaskHook
Task hooks allow execution of extra commands or scripts at different points within a task's lifecycle.
Table of contents
Properties
Properties
id
• Optional
id: string
Identifies a hook uniquely with the configuration. Hooks with the same ID will override subsequent definitions of the same hook.
command
• command: string
Script that should be run when this hook triggers. This can be a single command, or a path to a script.
soft_fail
• soft_fail: boolean
= false
When true, errors from executing the hooks command are ignored, otherwise they are propagated as the tasks exit code.
type
• type: TaskHookType
Type of hook this represents, ie, when in the lifecycle of a task should this hook execute.
when
• Optional
when: ConditionExpression
An optional conditional statement that will be evaluated. When the condition evaluates to a truthy value, then the hook command is executed, otherwise it is skipped.
When no conditions are defined, the command is executed unconditionally.