Continuous Integration (CI) events include the subject and predicates related to CI activities such as building software, producing artifacts and running tests.
This specification defines three subjects in this stage: builds
, artifacts
and tests
. Events associated with these subjects are typically generated either by a CI system that orchestrates the process or by a specific build or test tool directly. Some artifact events may be generated by the system that stores the artifact as well.
Subject | Description | Predicates |
---|---|---|
build |
A software build | queued , started , finished |
testCase |
A software test case | queued , started , finished |
testSuite |
A collection of test cases | started , finished |
artifact |
An artifact produced by a build | packaged , published |
A build
is a process that uses a recipe to produce an artifact from source code.
Note: The data model for builds
, apart from id
and source
, only includes the identifier of the artifact produced by the build. The inputs to the build process are not specified yet.
Field | Type | Description | Examples |
---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | 1234 , maven123 , builds/taskrun123 |
source | URI-Reference |
source from the context | staging/tekton , tekton-dev-123 |
artifactId | String |
Identifier of the artifact produced by the build | pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427 , pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c |
A testCase
is a process that performs a test against an input software artifact of some kind, for instance source code, a binary, a container image or else. A testCase
is the smallest unit of testing that the user wants to track. testCases
are executed, and testSuites
are for grouping purposes. For this reason, testCases
can be queued.
Note: The data model for testCase
only includes id
and source
, inputs and outputs of the process are not specified yet, as well as the relation to testSuite
.
Field | Type | Description | Examples |
---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | unitest-abc , e2e-test1 , scan-image1 |
source | URI-Reference |
source from the context | staging/tekton , tekton-dev-123 |
A testSuite
represents a set of one or more testCases
.
Note: The data model for testSuite
only includes id
and source
, inputs and outputs of the process are not specified yet, as well as the relation to testCase
.
Field | Type | Description | Examples |
---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | unit , e2e , security |
source | URI-Reference |
source from the context | staging/tekton , tekton-dev-123 |
An artifact
is usually produced as output of a build process. Events need to be generated to indicate that an artifact
has been packaged and released for others to use. These events can be produced by the artifact producer or by the artifact storage system.
Field | Type | Description | Examples |
---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427 , pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c |
source | URI-Reference |
source from the context | staging/tekton , tekton-dev-123 |
change | object |
The change (tag, commit, revision) of the repository which was used to build the artifact" | {"id": "527d4a1aca5e8d0df24813df5ad65d049fc8d312", "source": "my-git.example/an-org/a-repo"} , {"id": "feature1234", "source": "my-git.example/an-org/a-repo"} |
This event represents a Build task that has been queued; this build process usually is in charge of producing a binary from source code.
- Event Type:
dev.cdevents.build.queued.0.1.0
- Predicate: queued
- Subject:
build
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | 1234 , maven123 , builds/taskrun123 |
✅ |
source | URI-Reference |
source from the context | ⚪ |
This event represents a Build task that has been started; this build process usually is in charge of producing a binary from source code.
- Event Type:
dev.cdevents.build.started.0.1.0
- Predicate: started
- Subject:
build
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | 1234 , maven123 , builds/taskrun123 |
✅ |
source | URI-Reference |
source from the context | ⚪ |
This event represents a Build task that has finished. This event will eventually contain the finished status, success, error or failure
- Event Type:
dev.cdevents.build.finished.0.1.0
- Predicate: finished
- Subject:
build
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | 1234 , maven123 , builds/taskrun123 |
✅ |
source | URI-Reference |
source from the context | ⚪ | |
artifactId | Purl |
Identifier of the artifact produced by the build | pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427 , pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c |
⚪ |
This event represents a Test task that has been queued, and it is waiting to be started.
- Event Type:
dev.cdevents.testcase.queued.0.1.0
- Predicate: queued
- Subject:
testCase
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | unitest-abc , e2e-test1 , scan-image1 |
✅ |
source | URI-Reference |
source from the context | ⚪ |
This event represents a Test task that has started.
- Event Type:
dev.cdevents.testcase.started.0.1.0
- Predicate: started
- Subject:
testCase
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | unitest-abc , e2e-test1 , scan-image1 |
✅ |
source | URI-Reference |
source from the context | ⚪ |
This event represents a Test task that has finished. This event will eventually contain the finished status: success, error or failure.
- Event Type:
dev.cdevents.testcase.finished.0.1.0
- Predicate: finished
- Subject:
testCase
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | unitest-abc , e2e-test1 , scan-image1 |
✅ |
source | URI-Reference |
source from the context | ⚪ |
This event represents a Test suite that has been started.
- Event Type:
dev.cdevents.testsuite.started.0.1.0
- Predicate: started
- Subject:
testSuite
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | unit , e2e , security |
✅ |
source | URI-Reference |
source from the context | ⚪ |
This event represents a Test suite that has has finished, the event will contain the finished status: success, error or failure.
- Event Type:
dev.cdevents.testsuite.finished.0.1.0
- Predicate: finished
- Subject:
testSuite
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | String |
Uniquely identifies the subject within the source. | unit , e2e , security |
✅ |
source | URI-Reference |
source from the context | ⚪ |
The event represents an artifact that has been packaged for distribution; this artifact is now versioned with a fixed version.
- Event Type:
dev.cdevents.artifact.packaged.0.1.0
- Predicate: packaged
- Subject:
artifact
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | Purl |
Uniquely identifies the subject within the source. | pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427 , pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c |
✅ |
source | URI-Reference |
source from the context | ⚪ |
The event represents an artifact that has been published and it can be advertised for others to use.
- Event Type:
dev.cdevents.artifact.published.0.1.0
- Predicate: published
- Subject:
artifact
Field | Type | Description | Examples | Mandatory ✅ | Optional ⚪ |
---|---|---|---|---|
id | Purl |
Uniquely identifies the subject within the source. | pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427?repository_url=mycr.io/myapp , pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c |
✅ |
source | URI-Reference |
source from the context | ⚪ |