Skip to content

Latest commit

 

History

History
139 lines (102 loc) · 8.05 KB

continuous-integration.md

File metadata and controls

139 lines (102 loc) · 8.05 KB

Continuous Integration Events

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
artifact An artifact produced by a build packaged, published, signed

testCase/testSuite events have moved to their own top-level bucket Testing Events

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
type String See type build
artifactId String Identifier of the artifact produced by the build pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427, pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c

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 See id pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427, pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c
source URI-Reference See source staging/tekton, tekton-dev-123
type String See type artifact
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"}
signature string The signature of the artifact MEYCIQCBT8U5ypDXWCjlNKfzTV4KH516/SK13NZSh8znnSMNkQIhAJ3XiQlc9PM1KyjITcZXHotdMB+J3NGua5T/yshmiPmp

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.0.1.1
  • Predicate: queued
  • Subject: build
Field Type Description Examples Required
id String See id 1234, maven123, builds/taskrun123
source URI-Reference See source
type String See type build

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.0.1.1
  • Predicate: started
  • Subject: build
Field Type Description Examples Required
id String See id 1234, maven123, builds/taskrun123
source URI-Reference See source
type String See type build

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.0.1.1
  • Predicate: finished
  • Subject: build
Field Type Description Examples Required
id String See id 1234, maven123, builds/taskrun123
source URI-Reference See source
type String See type
artifactId Purl Identifier of the artifact produced by the build pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427, pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c build

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.0.1.1
  • Predicate: packaged
  • Subject: artifact
Field Type Description Examples Required
id Purl See id pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427, pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c
source URI-Reference See source
type String See type artifact
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"}

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.0.1.1
  • Predicate: published
  • Subject: artifact
Field Type Description Examples Required
id Purl See id pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427?repository_url=mycr.io/myapp, pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c
source URI-Reference See source
type String See type artifact

artifact signed

The event represents an artifact that has been signed. The signature is included in the events itself. An artifact may be signed after it has been packaged or sometimes after it has published, depending on the tooling being used and the type of artifact.

  • Event Type: dev.cdevents.artifact.signed.0.1.0
  • Predicate: signed
  • Subject: artifact
Field Type Description Examples Required
id Purl See id pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427?repository_url=mycr.io/myapp, pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c
source URI-Reference See source
type String See type artifact
signature string The signature of the artifact MEYCIQCBT8U5ypDXWCjlNKfzTV4KH516/SK13NZSh8znnSMNkQIhAJ3XiQlc9PM1KyjITcZXHotdMB+J3NGua5T/yshmiPmp