forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit events for all TaskRun lifecycle events
Start emitting events for additional TaskRun lifecyle events: - taskrun started - taskrun timeout Introduce pre-run and post-run functions that are invoked asynchronously when the taskrun starts and completes, to emit events. These same functions shall be used to trigger any other async behaviour on start/stop of taskruns. Add documentation on events. Fixes tektoncd#2328 Work towards tektoncd#2082
- Loading branch information
Showing
6 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- | ||
--- | ||
linkTitle: "Events" | ||
weight: 2 | ||
--- | ||
--> | ||
# 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#event-v1-core), that can be retrieve from the resource via | ||
`kubectl describe [resource]`. | ||
|
||
No events are emitted for `Conditions` today. | ||
|
||
## TaskRuns | ||
|
||
`TaskRun` events are generated for the following `Reasons`: | ||
- `Started`: this is triggered the first time the `TaskRun` is picked by the | ||
reconciler from its work queue, so it only happens if validation was | ||
successful. | ||
- `Succeeded`: this is triggered once all steps in the `TaskRun` are executed | ||
successfully, including post-steps injected by Tekton. | ||
- `Failed`: this is triggered if the `TaskRun` is completed, but not successfully. | ||
Causes of failure may be: one the steps failed, the `TaskRun` was cancelled or | ||
the `TaskRun` timed out. | ||
|
||
## PipelineRuns | ||
|
||
`PipelineRun` events are generated for the following `Reasons`: | ||
- `Succeeded`: this is triggered once all `Tasks` reachable via the DAG are | ||
executed successfully. | ||
- `Failed`: this is triggered if the `PipelineRun` is completed, but not | ||
successfully. Causes of failure may be: one the `Tasks` failed or the | ||
`PipelineRun` was cancelled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters