Events
Tekton runtime resources, specifically TaskRuns and PipelineRuns,
emit events when they are executed, so that users can monitor their lifecycle
and react to it.
Tekton emits kubernetes events, that can be retrieve from the resource via kubectl describe [resource].
Optionally Tekton can emit CloudEvents too.
No events are emitted for Conditions today (https://github.com/tektoncd/pipeline/issues/2461).
TaskRuns
TaskRun events are generated for the following Reasons:
Started: this is triggered the first time theTaskRunis picked by the reconciler from its work queue, so it only happens if web-hook validation was successful. Note that this event does not imply that a step started executing, as several conditions must be met first:- task and bound resource validation must be successful
- attached conditions must run successfully
- the
Podassociated to theTaskRunmust be successfully scheduled
Succeeded: this is triggered once all steps in theTaskRunare executed successfully, including post-steps injected by Tekton.Failed: this is triggered if theTaskRunis completed, but not successfully. Causes of failure may be: one the steps failed, theTaskRunwas cancelled or theTaskRuntimed out.Failedevents are also triggered in case theTaskRuncannot be executed at all because of validation issues.
PipelineRuns
PipelineRun events are generated for the following Reasons:
Started: this is triggered the first time thePipelineRunis picked by the reconciler from its work queue, so it only happens if web-hook validation was successful. Note that this event does not imply that a step started executing, as pipeline, task and bound resource validation must be successful first.Running: this is triggered when thePipelineRunpasses validation and actually starts running.Succeeded: this is triggered once allTasksreachable via the DAG are executed successfully.Failed: emitted if thePipelineRunfinishes running unsuccessfully because aTaskfailed or thePipelineRuntimed out or was cancelled. APipelineRunalso emitsFailedevents if it cannot execute at all due to failing validation.
Events via CloudEvents
When you configure a sink, Tekton emits events as described in the table below.
| Resource | Event | Event Type |
|---|---|---|
TaskRun |
Started |
dev.tekton.event.taskrun.started.v1 |
TaskRun |
Running |
dev.tekton.event.taskrun.runnning.v1 |
TaskRun |
Condition Change while Running |
dev.tekton.event.taskrun.unknown.v1 |
TaskRun |
Succeed |
dev.tekton.event.taskrun.successful.v1 |
TaskRun |
Failed |
dev.tekton.event.taskrun.failed.v1 |
PipelineRun |
Started |
dev.tekton.event.pipelinerun.started.v1 |
PipelineRun |
Running |
dev.tekton.event.pipelinerun.runnning.v1 |
PipelineRun |
Condition Change while Running |
dev.tekton.event.pipelinerun.unknown.v1 |
PipelineRun |
Succeed |
dev.tekton.event.pipelinerun.successful.v1 |
PipelineRun |
Failed |
dev.tekton.event.pipelinerun.failed.v1 |
Feedback
Was this page helpful?
Thanks! Tell us how we can further improve.
Sorry about that. Tell us how we can further improve.