Project: CDEvents (App Definition and Development / Streaming & Messaging)
File: core.md

<!-- linkTitle: "Core Events" weight: 30 hide_summary: true icon: "fa-solid fa-bars-staggered" description: > Continuous Delivery Core Events --> Continuous Delivery Core Events include the subjects and predicates related to orchestration of execution required to deterministically and continuously delivery software to users. Core events are at the lower level of abstraction in the dictionary: they describe the status of an execution, but they don't include any semantic about the function of the execution itself. These events are generated by . In the context of Continuous Delivery, a pipeline is the definition of a set of tasks that needs to be performed to build, test, package, release and deploy software artifacts. The definition of pipelines and tasks is an authoring process, and has no event associated to it. CDEvents identifies two , and , which are the runtime counterparts of pipelines and tasks. | Subject | Description | Predicates | ||-|| | | An instance of a pipeline | , , | | | An instance of a task | , | A pipeline can be instantiated multiple times, for example to build different versions of the same artifact. We are referring to this instance as . It will have a unique id and it will help us to track the build and release progress on a particular software artifact. | Field | Type | Description | Examples | |-||-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/pipelinerun-1234` | | source | `URI-Reference` | See | | | type | `String` | See | `pipelineRun` | | pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | outcome | `String` | outcome of a finished `pipelineRun` | `success`, `error` or `failure`| | url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` | | errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun canceled by user`, `Unit tests failed`| Pipelines are composed by as a set of Tasks to be performed, like performing a build, running some tests, publishing an artifact. A taskRun is an instance of a Task, typically part of a pipeline. If a Pipeline is composed by a single Task, the execution of pipelineRun MUST generate both the pipelineRun and taskRun events. Some systems may support execution of Tasks without a Pipeline associated, in which case it is acceptable to generate only taskRun events. | Field | Type | Description | Examples | |-||-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/taskrun-1234` | | source | `URI-Reference` | See | | | type | `String` | See | `taskRun` | | taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | pipelineRun | `Object` () | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | outcome | `String` | outcome of a finished `taskRun` | `success`, `error` or `failure`| | url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | | errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `taskRun canceled by user`, `Unit tests failed`| Due the dynamic nature of Pipelines, most of actual work needs to be queued to happen in a distributed way, hence queued events are

Adopters can choose to ignore these events if they don't apply to their use cases. Event Type: `dev.cdevents.pipelinerun.queued.0.3.0-draft` Predicate: queued Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/pipelinerun-1234` | | | source | `URI-Reference` | See | | | | type | `String` | See | `pipelineRun` | | | pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | | url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` | | A pipelineRun has started and it is running. Event Type: `dev.cdevents.pipelinerun.started.0.3.0-draft` Predicate: started Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/pipelinerun-1234` | | | source | `URI-Reference` | See | | | | type | `String` | See | `pipelineRun` | | | pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | | url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` | | A pipelineRun has finished, successfully or not. Event Type: `dev.cdevents.pipelinerun.finished.0.3.0-draft` Predicate: finished Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/pipelinerun-1234` | | | source | `URI-Reference` | See | | | | type | `String` | See | `pipelineRun` | | | pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | | url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` | | | outcome | `String (enum)` | outcome of a finished `pipelineRun` | `success`, `error` or `failure`| | | errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun canceled by user`, `Unit tests failed`| | A taskRun has started and it is running. Event Type: `dev.cdevents.taskrun.started.0.3.0-draft` Predicate: started Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/taskrun-1234` | | | source | `URI-Reference` | from the context | | | | type | `String` | See | `taskRun` | | | taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | | pipelineRun | `Object` () | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | | url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | | A taskRun has finished, successfully or not. Event Type: `dev.cdevents.taskrun.finished.0.3.0-draft` Predicate: finished Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/taskrun-1234` | | | source | `URI-Reference` | from the context | | | | type | `String` | See | `taskRun` | | | taskName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | | | pipelineRun | `Object` () | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| | | url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | | | outcome | `String (enum)` | outcome of a finished `taskRun` | `success`, `error` or `failure`| | | errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `taskRun canceled by user`, `Unit tests failed`| |