Continuous Integration Events

Continuous Integration Events

Note: This is a work-in-progress draft version and is being worked on by members of the Events SIG. You are very welcome to join the work and the discussions!

Continuous Integration (CI) events include the subject and predicates related to CI activities such as building software, producing artifacts and running tests.

Subjects

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

build

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 0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427, 927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5, six-1.14.0-py2.py3-none-any.whl

testCase

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

testSuite

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

artifact

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. abcde-12344-a2b35, sh0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427a1234, myimage@sha256:123456abcded, six-1.14.0-py2.py3-none-any.whl
source URI-Reference source from the context staging/tekton, tekton-dev-123

Events

build queued

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
  • 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 ⚪

🚧 The build model is work in progress.

build started

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
  • 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 ⚪

🚧 The build model is work in progress.

build finished

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
  • 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 String Identifier of the artifact produced by the build 0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427, 927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5, -six-1.14.0-py2.py3-none-any.whl ⚪

🚧 The build model is work in progress.

testCase queued

This event represents a Test task that has been queued, and it is waiting to be started.

  • Event Type: dev.cdevents.testcase.queued
  • 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 ⚪

🚧 The testCase model is work in progress.

testCase started

This event represents a Test task that has started.

  • Event Type: dev.cdevents.testcase.started
  • 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 ⚪

🚧 The testCase model is work in progress.

testCase finished

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
  • 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 ⚪

🚧 The testCase model is work in progress.

testSuite started

This event represents a Test suite that has been started.

  • Event Type: dev.cdevents.testsuite.started
  • 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 ⚪

🚧 The testSuite model is work in progress.

testSuite finished

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
  • 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 testSuite model is work in progress.

artifact packaged

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
  • Predicate: packaged
  • Subject: artifact
Field Type Description Examples Mandatory ✅ | Optional ⚪
id String Uniquely identifies the subject within the source. abcde-12344-a2b35, sh0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427a1234, myimage@sha256:123456abcded, six-1.14.0-py2.py3-none-any.whl ✅
source URI-Reference source from the context ⚪

artifact published

The event represents an artifact that has been published and it can be advertised for others to use.

  • Event Type: dev.cdevents.artifact.published
  • Predicate: published
  • Subject: artifact
Field Type Description Examples Mandatory ✅ | Optional ⚪
id String Uniquely identifies the subject within the source. abcde-12344-a2b35, sh0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427a1234, myimage@sha256:123456abcded, six-1.14.0-py2.py3-none-any.whl ✅
source URI-Reference source from the context ⚪