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 pipeline orchestration engines.
Subjects
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 subjects, pipelineRun
and taskRun
, which are the runtime counterparts of pipelines and tasks.
Subject | Description | Predicates |
---|---|---|
pipelineRun |
An instance of a pipeline | queued , started , finished |
taskRun |
An instance of a task | started , finished |
pipelineRun
A pipeline can be instantiated multiple times, for example to build different
versions of the same artifact. We are referring to this instance as
pipelineRun
. 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 |
Uniquely identifies the subject within the source. | tenant1/12345-abcde , namespace/pipelinerun-1234 |
source | URI-Reference |
source from the context | |
pipelineName | String |
The name of the pipeline | MyPipeline , Unit tests for my repo |
outcome | Enum |
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 cancelled by user , Unit tests failed |
taskRun
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 |
Uniquely identifies the subject within the source. | tenant1/12345-abcde , namespace/taskrun-1234 |
source | URI-Reference |
source from the context | |
taskName | String |
The name of the pipeline | MyPipeline , Unit tests for my repo |
pipelineRun | Object (pipelineRun ) |
The pipelineRun that this taskRun belongs to. |
{"id": "namespace/pipelinerun-1234"} |
outcome | Enum |
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 cancelled by user , Unit tests failed |
Events
pipelineRun queued
Due the dynamic nature of Pipelines, most of actual work needs to be queued to happen in a distributed way, hence queued events are added. Adopters can choose to ignore these events if they don’t apply to their use cases.
- Event Type:
dev.cdevents.pipelinerun.queued.0.1.0
- Predicate: queued
- Subject:
pipelineRun
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | tenant1/12345-abcde , namespace/pipelinerun-1234 |
✅ |
source | URI-Reference |
source from the context | ⚪ | |
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 |
⚪ |
pipelineRun Started
A pipelineRun has started and it is running.
- Event Type:
dev.cdevents.pipelinerun.started.0.1.0
- Predicate: started
- Subject:
pipelineRun
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | tenant1/12345-abcde , namespace/pipelinerun-1234 |
✅ |
source | URI-Reference |
source from the context | ⚪ | |
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 |
⚪ |
pipelineRun Finished
A pipelineRun has finished, successfully or not.
- Event Type:
dev.cdevents.pipelinerun.finished.0.1.0
- Predicate: finished
- Subject:
pipelineRun
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | tenant1/12345-abcde , namespace/pipelinerun-1234 |
✅ |
source | URI-Reference |
source from the context | ⚪ | |
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 | 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 cancelled by user , Unit tests failed |
⚪ |
taskRun Started
A taskRun has started and it is running.
- Event Type:
dev.cdevents.taskrun.started.0.1.0
- Predicate: started
- Subject:
taskRun
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | tenant1/12345-abcde , namespace/taskrun-1234 |
✅ |
source | URI-Reference |
source from the context | ⚪ | |
taskName | String |
The name of the pipeline | MyPipeline , Unit tests for my repo |
⚪ |
pipelineRun | Object (pipelineRun ) |
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 |
⚪ |
taskRun Finished
A taskRun has finished, successfully or not.
- Event Type:
dev.cdevents.taskrun.finished.0.1.0
- Predicate: finished
- Subject:
taskRun
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | tenant1/12345-abcde , namespace/taskrun-1234 |
✅ |
source | URI-Reference |
source from the context | ⚪ | |
taskName | String |
The name of the pipeline | MyPipeline , Unit tests for my repo |
⚪ |
pipelineRun | Object (pipelineRun ) |
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 | 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 cancelled by user , Unit tests failed |
⚪ |