You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emit events for additional TaskRun lifecyle events:
- taskrun started
- taskrun running
- taskrun timeout
Fix the logic in events.go to compare semantic equality as
opposed to raw pointer equality.
Fix broken EmitEvents unit tests and extend them to cover new
functionality.
Extend reconcile test to verify new events are sent. To do so,
get the event recorder from the context when creating the
controller - if avaialble. This allows using the fake recorder
for testing instead of having to look for event related actions
in the fake client go action list.
Add documentation on events.
Fixes#2328
Work towards #2082
Tekton runtime resources, specifically `TaskRuns` and `PipelineRuns`,
10
+
emit events when they are executed, so that users can monitor their lifecycle
11
+
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
12
+
`kubectl describe [resource]`.
13
+
14
+
No events are emitted for `Conditions` today (https://github.com/tektoncd/pipeline/issues/2461).
15
+
16
+
## TaskRuns
17
+
18
+
`TaskRun` events are generated for the following `Reasons`:
19
+
-`Started`: this is triggered the first time the `TaskRun` is picked by the
20
+
reconciler from its work queue, so it only happens if web-hook validation was
21
+
successful. Note that this event does not imply that a step started executing,
22
+
as several conditions must be met first:
23
+
- task and bound resource validation must be successful
24
+
- attached conditions must run successfully
25
+
- the `Pod` associated to the `TaskRun` must be successfully scheduled
26
+
-`Succeeded`: this is triggered once all steps in the `TaskRun` are executed
27
+
successfully, including post-steps injected by Tekton.
28
+
-`Failed`: this is triggered if the `TaskRun` is completed, but not successfully.
29
+
Causes of failure may be: one the steps failed, the `TaskRun` was cancelled or
30
+
the `TaskRun` timed out.
31
+
32
+
## PipelineRuns
33
+
34
+
`PipelineRun` events are generated for the following `Reasons`:
35
+
-`Succeeded`: this is triggered once all `Tasks` reachable via the DAG are
36
+
executed successfully.
37
+
-`Failed`: this is triggered if the `PipelineRun` is completed, but not
38
+
successfully. Causes of failure may be: one the `Tasks` failed or the
0 commit comments